Welcome!

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

Reply
Developer
DNSalehi
Posts: 47
Registered: ‎01-26-2011
My Device: Not Specified

How to get id of page on stack

So I have a page that can be pushed from two different NavigationPanes. The problem is when I want to pop the page, I'm not sure how to call the pop since I don't know which of the two panes the push came from.

 

Is there a simple way to get the id of the page that did the pushing?

Please use plain text.
Developer
Zmey
Posts: 1,511
Registered: ‎12-18-2012
My Device: PlayBook, Z10, DAC

Re: How to get id of page on stack

Page has it's navigation pane set as it's parent. You can use a parent property (or parent() function in C++) to access it.

Andrey Fidrya, @zmeyc on twitter
Please use plain text.
Developer
javayoung
Posts: 313
Registered: ‎05-31-2010
My Device: Alpha 10, Bold 9900, Storm 9530, Tour 9630, Curve 9320, Curve 8900
My Carrier: All

Re: How to get id of page on stack

[ Edited ]

I remembered we had discussed one similar issue:

http://supportforums.blackberry.com/t5/Cascades-Development/Store-a-NavigationPane-as-a-QML-property...

 

You can simply use xxx.parent to find the parent  (xxx is the id of the current page)

You can use xxx.parent.pop() to pop the current page.




p(^_^)q
Good good study, day day up
Please use plain text.