Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Native Development

Posts: 15
Registered: ‎10-24-2013
My Device: z10
My Carrier: Macadamian
Accepted Solution

Cannot push to navigation pane from a component outside main.qml

[ Edited ]

Here is part of my main.qml


 Container {
            id: main_content
            attachedObjects: [
                ComponentDefinition {
                    id: listtodo
                    source: "mainList.qml"
            property variant listtodoObj
            onCreationCompleted: {
                listtodoObj = listtodo.createObject();
                if (!listtodoObj)
                    listtodoObj = listtodo.createObject();
                listtodoObj.dataModel = Model.get();	            

 I haven't included NavigationPane but in main, I have a navigation pane with id "navigationPane".

Here is part of my mainList.qml:

gestureHandlers: [
                    TapHandler {
                        attachedObjects: ComponentDefinition {
                            id: infoPage;
                            source: "asset:///taskInfo.qml"                        
                        onTapped: {
                            var page = infoPage.createObject();


But I cannot access navigationPane. In console it says: "Can't find variable: navigationPage"


What can I do?

Posts: 17,019
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport
My Carrier: O2 Germany

Re: Cannot push to navigation pane from a component outside main.qml

this should help:
feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.
@SimonHain on twitter