Problem in NavigationPane

Hi, I use NavigationPane to open the page in the file of main.qml its market well.

Now when I add the NavigationPane in another document qml his does not work...

As

I created main.qml and in annex 5 actions:

Actions: Action

Action B

Action C

Action D

Action E

then when I clicked to any option it gets opened the page...

But if I add another action in any of these measures such as:

A share

Action B

Action C

Action 1

Action 2

Action 3

Action D

Action E

so these pages are not open?

Can we add NavigationPane to the homepage only? Or y at - it another way to do this?

Thamks in advance

to open a page, you are using the navigation pane, you already have. you need only one alone (in general).
the navigation pane of the give an ID (like navPane) and it will be available in all child qml elements.
to display a new page call you navPane.push (newPage);

Tags: BlackBerry Developers

Similar Questions

  • Crash error NavigationPane on Simulator of Q10

    Hi everyone, I have a problem with NavigationPane on Simulator of Q10.

    This is my code:

    fprintf(stderr,"1---\n");

    Page * = navigationPane topPage (Page *)-> top();

    fprintf(stderr,"2---\n");

    navigationPane isn't a NULL pointer and contain a page. He hang on line code 2.

    Simulator Z10 is OK, but on the simulator of Q10 he plant? I made a mistake, or is this a bug?

    Thanks for any answer!

    Found, I found it, so it's own by another thread, it crash when the main thread access and I solved the problem with Threads and it OK now

  • Problems running the example NavigationPane

    Hi, just trying to get an idea how to use the NavigationPane in my application.

    I'm trying to follow this example: https://developer.blackberry.com/cascades/reference/bb__cascades__navigationpane.html
    This is how my class looks like where I want to add a NavigationPane:

    
    import bb.cascades 1.0
    
    NavigationPane {
        id: navigationPane
    
    Page {
    
        // Root Container
        Container {
    
           ...
    
               CustomButton {
                      text: "Click me"
                      btnBackground: "asset:///btn-lightblue.png"
                      btnSelected: "asset:///btn-green.png"
                      bottomPadding: 12.0
                      topPadding: 12.0  
    
                     // This is where I want the second Page to show up
                     onTouch: {
                           var page = pageDefinition.createObject();
                           navigationPane.push(page);
    
                     }
    
                      attachedObjects: ComponentDefinition { // where should this go?
                                                   id: pageDefinition;
                                                   source: "SecondDialog.qml"
                      }
    
              }
    
        ...
    
        } // Container
    
    } // Page
    
        onPopTransitionEnded: { page.destroy(); }
    
    } // Navigation Pane
    

    But when the user clicks on the button "Click me" the SecondDialog.qml does not appear... Can someone point out what I'm doing wrong...? Thank you.

    OK, it is resolved, the problem is in the second page I add me to the navigation pane, missed me an "import bb.cascades 1.0" - it

  • navigationPane, application menu problem

    Hello

    I'm trying to add a topic page to my application. The only thing is that when I write the code that I think that what is good, it won't.

    Here is the code:

    import bb.cascades 1.0
    import bb.data 1.0
    
    NavigationPane {
    id: navPane
    
    Menu.definition: MenuDefinition {
    actions: [
    ActionItem {
    title: "About"
    imageSource: "images/ic_info.png"
    
    onTriggered: {
    navPane.push(infoDS.createObject())
    }
    }
    ]
    }
    

    ... later on in attachedObjects:

    ComponentDefinition {
             id: infoDS
             source: "aboutDutchscene.qml"
         }
    

    When I remove these codes that the app works fine, when I have this code the application will load only the splash screen.

    Anyone who is familiar with that? I'm hoping to find a solution!

    Thanks in advance for your help,

    Stanley

    You try to put a NavigationPane in a NavigationPane.  It does not work.

    Your main.qml page takes the NavigationPane and your first information Page.

    NavigationPane {
        id: mainNavPane
        Page {
            id:mainPage
            Container {
                // Info page components
            }
    
            actions: [
            ActionItem {
                id: aiAboutButton
                imageSource: "asset:///images/ic_info.png"
                title:"About"
                onTriggered: {
                    navPane.push(infoDS.createObject());
                }
    
                    attachedObjects: [
                        ComponentDefinition {
                            id: infoDS
                            AboutDutchscene {  }
                        }
                    ]   
    
            }
            ]
        }
    
        onPopTransitionEnded: {
            // Destroy the popped Page once the back transition has ended.
            page.destroy();
        }
    }
    

    Then push page should just be a Page

    Page {
        id:aboutDutchscenePage
        Container {
            layout: DockLayout {}
    
            ImageView {
                horizontalAlignment: HorizontalAlignment.Fill
                verticalAlignment: VerticalAlignment.Fill
    
                imageSource: "asset:///images/background.png"
            }
    
            Container {
                horizontalAlignment: HorizontalAlignment.Fill
                verticalAlignment: VerticalAlignment.Fill
    
                Container {
                    horizontalAlignment: HorizontalAlignment.Center
                    layout: DockLayout {}
    
                    ImageView {
                        horizontalAlignment: HorizontalAlignment.Fill
                        verticalAlignment: VerticalAlignment.Fill
    
                        imageSource: "asset:///images/header_background.png"
                    }
    
                    Label {
                        horizontalAlignment: HorizontalAlignment.Center
    
                        text: qsTr ("About")
                        textStyle.base: SystemDefaults.TextStyles.BigText
                        textStyle.color: Color.create("#bb0099CC")
                    }
                }
            }
        }
    }
    

    You can probably push a NavigationPane in a NavigationPane, but you must first a Page, and then click a container to push in.

  • Problem with a navigationPane tabs style

    Hello

    Using jdev 11.1.1.3, trying the navigationPane style with suspicion attached to tabs. I want to enlarge the font inside the tabs. I am able to do it with:

    AF | {navigationPane - tabs:tab - link}
    do-size: 12pt;
    }

    However, when a tab is selected, the police returned to default. I tried different combinations of pseudo-class without success. Does anyone know how to style a selected tab?

    Hello

    Try

    af|navigationPane-tabs::tab:selected
    {
        font-size: 12pt;
    }
    
    /* or */
    af|navigationPane-tabs::tab:selected af|navigationPane-tabs::tab-link
    {
        font-size: 12pt;
    }
    

    Kind regards

    ~ Simon

  • TabbedPane NavigationPane and return

    Hi all

    I am currently working on an application that has a TabbedPane as root control, one of the tabs has a grid of buttons which, once clicked will be display a NavigationPanel which will allow the user to scroll through the different pages.

    The problem I have is how to return to the TabbedPane, once I'm done with the NavigationPane. Is the closest I have set up an action close in the action menu that displays the last page, then tries to restore the tabs panel display using the "Application::instance()-> setScene (root);", unfortunately, this causes app to freeze.

    Ideally, I would go back to the TabbedPane using the default back button on the first page, but it seems to be disabled, adding that a custom button also fails IE does not appear.

    So I was wondering if I'm missing something, IE the TabbedPane need to recreate?

    Thanks for any help, how to integrate the different controls seems a little light on documentation.

    Thanks and greetings

    James

    You don't need to return the pane tabs - use the following structure:

    TabbedPane {
    
      Tab {
        id: tab1
        title: "First Tab"    NavigationPane {
          id: nav1
    
          Page {        id: page1
            /* put your buttons here */
          }      onPopTransitionEnded: { page.destroy(); }
        }  }
    
      Tab {
        id: tab2
      }
    }
    

    The structure above would output a blank page in your first tab. There will be no back along the action bar button, and the action bar itself will be invisible unless you put some ActionItems in there. Put your buttons on this first page (put it in a separate QML file so that your main.qml is sharper).

    When you press a button on your home page (page1), pushing an extra page for 'nav1' it will be pushed ontop of page1 - and you'll get a back button this time. You have no need to do something to get back to the basic page, except by pressing the back button. When the top of the page gets jumped, you will automatically return to the base of the base. Be sure to destroy the pages you create in the onPopTransitionEnded handler.

  • NavigationPane ButtonBack overlapps content

    Hey

    When I do

    page->setContent(container);
    navigationPane->setBackButtonsVisible(true);
    navigationPane->push(page);
    

    Stuff from my container are covered by the navigationbar with the backButton

    my simple code:

    constructor() {
        ......    Menu *menu = new Menu;    SettingsActionItem *settingsItem = new SettingsActionItem;    menu->setSettingsAction(settingsItem);    connect(settingsItem, SIGNAL(triggered()), this, SLOT(openSettings()));    Application::instance()->setMenu(menu);    ....
        openUI();
    }
    
    openUI() {
        ...
        uiPage->setContent(uiContainer);
        navigationPane = NavigationPane::create().add(uiPage);
        Application::instance()->setScene(navigationPane);
    }
    
    openSettings() {
        settingsUIPage->setContent(container);
        navigationPane->setBackButtonsVisible(true);
        navigationPane->push(settingsUIPage);
    }
    

    I know that I do two 'screens' in a .cpp. I think that this is not the best way to do.

    Can I solve this problem by making 2 .cpp separated extending 'Page '?

    use a ScrollView wrapped around the container size

  • setProperty in pushed NavigationPane Page

    How to set the property on the page, which was pushed from NavigationPage?

    hand. QML

    import bb.cascades 1.0
    
    NavigationPane {
        id: navigationPane
        Button {
            text: qsTr("Game")
            onClicked: {
                navigationPane.push(gameDef.createObject())
            }
        }
        attachedObjects: [
            ComponentDefinition {
                id: gameDef
                source: "game.qml"
            }
        ]
    
        onPopTransitionEnded: {
            // Destroy the popped Page once the back transition has ended.
            page.destroy();
        }
    }
    

    Game.QML

    import bb.cascades 1.0
    
    Page {
        property int life: 40000
    
        //rest correct, not important
    }
    

    applicationui.cpp

    //fragment
    QmlDocument *qml = QmlDocument::create("asset:///main.qml").parent(this);
        qml->setContextProperty("app", this);
    
        // Create root object for the UI
        root = qml->createRootObject();
    
        root->setProperty("life", int(4));    //not work
    

    What to put in this CPC file, to change the ownership of life in the game.qml file?

    Thanks in advance

    I think you're going to struggle to write a full app so if you think it takes too much time.

    It's not a tip, it's a more condensed way to do what you already do part.

    If you do not do it this way it will NEVER work because THERE is NO such thing as the page that you want to access in applicationui.cpp.

    [Edit] I have also a problem with findChild as long as you understand its functionality and where and how to use it, then he has a purpose distinct and separate from the definition of property values.

  • In the root of TabbedPane NavigationPane

    Hi all

    I have a TabbedPane and then a menu with a SettingsActionItem. When this settings button fires I want to push a page that contains the parameters to this subject, and then I can click back to return to tabs.

    import bb.cascades 1.0
    
    TabbedPane {
        Menu.definition: MenuDefinition {
            settingsAction: SettingsActionItem {
                onTriggered: {
                    var page = setingsView.createObject();
                    navigationPane.push(page);
                }
                attachedObjects: ComponentDefinition {
                    id: settingsView
                    source: "SettingsView.qml"
                }
            }
        }
        Tab {
            tite: "Tab1"
            NavigationPane {
                id: navigationPane
                Page {
                     //etc.....
                }
            }    }}
    

    However, the problem is that there is no navigation pane to push the new page. We cannot put a NavigationPane under the TabbedPane, but we can put it in a tab of a TabbedPane.

    So, how can I go all by pushing a new page?

    Thank you!

    [UPDATED ABOVE CODE]

    I got it work using files separated such as:

    hand. QML

    TabbedPane {
        id: newsPane
    
     Tab{
         title: ""
            TabOne {
                }
    }
    Tab{
        title: ""
           TabTwo {
               }
        }
    Tab{
        title: ""
           TabThree {
               }
        }
    Tab{
        title: ""
           TabFour {
               }
        }        
    
    }
    

    Then, he...

    TabOne.qml, TabTwo.qml, TabThree.qml and TabFour.qml:

    NavigationPane {
        Page {
           ....
           }
       }
    

    And it has an a NavigationPane feel TabbedPane when I can push to a page within the NavigationPane and action bar has more tabs, rather it changes the back button.  Can be illustrated in this app: http://appworld.blackberry.com/webstore/content/20197455/?lang=en (I wrote the application for OnlineTobago)

    So as much as your page 'Settings', why not use a spreadsheet?  This is exactly what a spreadsheet is intended, something that breaks the normal flow of navigation.  And it can be accessed via the system menu of any tab, if defined in the main.qml and using the property alias you can control the id defined in TabOne.qml, TabTwo.qml, etc. I have a sample where I do it too: http://bbcascades.com/index.php/tutorial-list/50-persistence-of-cascades-memory

    I hope this helps.

  • NavigationPane - Action of the elements in a central list?

    I'm new to NDK/stunts/C++, I looked through the samples and documentation but have not found what I want to do.

    Our application consists of several "pages" / data entry screens. I would use the NavigationPane method and have an easy way for employees to access a specific page. For example, tapping the button list page, then the full menu on the side blades in view, they choose the page.

    I want to do is to have a file that contains all the elements of my action so that each page pulls right away for details, or even the ActionItem set bar. Is it still possible? Any suggestions on where to start?

    Hope I did it is a little light...

    Hello

    I was wondering if you had solved your problem or were still in need of support.

    Graham

  • We get a SIGBUS error when you press NavigationPane a second time.

    Hello!

    Im working on an application of news at the moment. The news are displayed in a list. When a ListItem is triggered, the navigation pane is pushed to the next page, like this:

    ListView {
                            property variant newsListViewOrientation: orientation;
                            id: newsListView
                            dataModel: xmlDataModel
                            scrollIndicatorMode: ScrollIndicatorMode.ProportionalBar
    
                            onTriggered: {
                                newsListView.clearSelection()
                                newsListView.select(indexPath, !newsListView.isSelected(indexPath));
                                var selectedItem = dataModel.data(indexPath);
    
                                var page = newsDetailPage.createObject();
                                page.title = selectedItem.title;
                                page.info = selectedItem.info;
                                page.date = selectedItem.date;
                                page.imagePath = selectedItem.img;
                                newsNavPane.push(page);
                            }
    
                            onSelectionChanged: {
                                var selectedItem = dataModel.data(indexPath);
                                console.log("selected Index: "+indexPath+" | selectedItem: "+selectedItem.title);
                            }
    
                            layout: StackListLayout {
    
                            }
    }
    

    The first time when you trigger the ListView, it works very well and pushed to the next Page. If you skip the navigation pane and try to push it again, the application goes down, and I get the following error on the console:

    Process 496513394 (SanofiTemp) terminated SIGBUS code=1 fltno=5 ip=7899eaf2(/base/usr/lib/qt4/lib/libQtXml.so.4.8.5@_ZN8QDomNodeC2EP15QDomNodePrivate+0x15) mapaddr=0000eaf2. ref=00000005
    

    Some more information:

    ListView is part of a tab, which belongs to a TabbedPane. The TabbedPane has another tab, with an another NavigationPane (the other NavigationPane works fine btw). And another thing: my NavigationPane has this game:

    onPopTransitionEnded: {
                    page.destroy();
                }
    

    No idea what means this error and how to solve?

    Thanks in advance!

    I found the error comes to me immediately. For those who already have this problem:

    The problem has been the onSelectionChanged method:

    
                            onSelectionChanged: {
                                var selectedItem = dataModel.data(indexPath);
                                console.log("selected Index: "+indexPath+" | selectedItem: "+selectedItem.title);
                            }
    

    This code was interrupted somehow push again navigation pane. If anyone knows why, feel free to explain it

  • Store a NavigationPane as a QML property

    I have code similar to the following places:

    onTriggered: {
        var chosenItem = dataModel.data(indexPath);
        var detailPage = detailsPageDefinition.createObject();
        detailPage.initDetailsPage(chosenItem);
        // Push the content page to the navigation stack
        main_list_nav.push(detailPage);
    }
    

    detailPage must also push the NavigationPane, but the problem is I have a couple of different NavigationPanes and the detailPage knows not only push you on.

    I want to be able to switch the navigation as the parameter pane to initDetailsPage() i.e.

    detailPage.initDetailsPage(chosenItem, main_list_nav);
    

    But how I declare this as a property? by DetailsPage.qml

    Page {
         property  navigationPaneToUse
    
         function initDetailsPage(item, navPane)
         {
              navigationPaneToUse = navPane
              ...
         }
    }
    

    If not, is there a property QML on a Page that tells it what NavigationPane he pushed to?

    Thanks for all the help guys. Suite suggested Zmey using the idea of the .parent property and generalizing javayoung above, I came up with this method I set on my UI root object, if it's available everywhere.

    It crosses just to the top of the tree of the child until it finds an ancestor with an object name that contains "NavigationPane", then push on that. In this way, that you don't need to store anything.

        function pushToParentNavigation(child, objToPush)
        {
            var cur = child;
            while(cur != null && cur.objectName.indexOf("NavigationPane") == -1)
            {
                cur = cur.parent;
            }
            if(cur.objectName.indexOf("NavigationPane") != -1)
            {
                cur.push(objToPush);
            }
            else
            {
                console.log("No NavigationPane in heirarchy!");
            }
        }
    

    So now I can just do this anywhere:

    // Push the content page to the navigation stack this page belongs to.
    pushToParentNavigation(this_page_id, myUIObject);
    

    This means that you must add objectName: 'NavigationPane' to all your NavigationPane who isn't ideal. If anyone can suggest a better way to do it, it would be great. I looked at JavaScript typeof operator, but it is not powerful enough.

  • Screen Navigation using the key and NavigationPane

    Hey all, I've set up the navigation pane and I can switch between screens conveniently. On one page, however, I like to have buttons that snap into the screens. I do this by using NavigationPane.deprecatedPushQmlByString ("testPage.qml"), but this causes the push page to not have a navigation pane, only a back button. Why pushing by the navigationPane compared to a button causes the navigationPane on screens pushed not to present what would be the best way to address this problem? I wll continue to search for a solution, but any thoughts would be appreciated. Thank you.

    understand now.

  • NavigationPane pushing a Page several times

    Not sure, which continues, but I have a navigationPane and in the ComponentDefinition, I have another qml page that gets thrust on the navigationPane when the signal of customDefined is called.

    Thus, as soon as the custom signal is triggered, it pushes page in the componentDefinition to the NavigationPane.

    So, now when I click on a listItem which finally triggers the signal customized in QML, he pushes the page very well, but if I come back and click again on the issue, he is now pushing 2 times and now I have to go back 2 times. the number keeps on incrementing at the same time, I click on the listItem.

    BTW, in the page defined in the component definition, it has properties pane that appears when the user clicks on the back of the battery.

    on newspapers, I see the page being skipped too.

    not sure what goes wrong, any help will be appreciated.

    Thank you

    S.

    Hello
    So, I found what the problem was.

    (1)   ListView *listV = root->findChild("listP");
        bool success = QObject::connect(this, SIGNAL(goodForPushPToTest1()), listV, SIGNAL(goodForPush()) );
        emit goodForPushToTest1(); // so, QT signal connected to signal in QML
    

    (1) is the line that caused the problem. the reason being that I create a new object each time and then pushing him to the navPane.

    make sense?

  • Pushing NavigationPane TabbedPane

    I'm trying to push a TabbedPane of NavigationPane (main.qml).

    var nextPage = nav.deprecatedPushQmlByString("tabbedPane.qml");
    

    It does not work. I know either

    (1) I'm doing something wrong

    (2) I do not understand what can or cannot be pushed some screens

    Working mainly in qml.

    I am able to push a 'Page' to NavigationPane. It works without problem.

    Any ideas?

    I too used TabbedPane under NavigationPane in beta 1 of the SDK. Now I just use action buttons to replace the tabbed pane. Here is the explanation of the beta Upgrade Guide 2.

    https://developer.BlackBerry.com/Cascades/documentation/dev/upgrading/index.html

    Adding a TabbedPane to NavigationPane is no longer allowed

    The reason for this change is a tabbed never add to the pages pane child yourNavigationPane. Tabbed browsing should be used only at the top level of your application.

    If you use the deeper navigation and tabbed browsing, you can use NavigationPane in aTabbedPane.

Maybe you are looking for

  • "Disk Creator" and update firmware on Equium A200-1V0

    Please forgive me if I'm missing something really obvious, but I can't find even if I need to update the firmware of my DVD burner. The doc readme says to start "Toshiba Disk Writer", and then select Audio CD - that should give me information on the

  • ipod nano 5 generation nuevo bateria, lasted 5 minutos

    Hola, me han regalado UN Ipod Nano 5 generation (supongo than otro regalo guardado vendria) totally nuevo y con su original precinto, creo as el modelo data 2010 y tras abrirlo y fornuis el operating system y tras mas of the 3 carga of the bateria ho

  • Code error 1058 and 80070422 in Windows Vista SP1 update

    I use Vista Home premium SP1 and now for a long time, that I was not able to use windows update. Im not sure when or how it started, but when I try to update, it gives the message: 'windows not can find new updates' Code 80070422.  In the Services un

  • Outlook 2007. Cannot start Microsoft outlook cannot open outlook window

    When windows update downloaded Security updates, six of them, 2 for windows XP and four security updates for office 2007. My computor due restart. I was not able to open outlook 2007 since then. When it will start, then it just stops and says "cannot

  • My computer is running hot whenever I play a game and stops

    When I play a game on the computer as Witcher2, the computer runs hot and then stops when I turn on it shows he got hot at 90 degrees. Can I do to prevent that from happening. Thanks for any help.