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: 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?

Posts: 1,524
Registered: ‎12-18-2012
My Device: Z30, Z10 LE, DevAlpha C, PlayBook

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
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:



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.

Good good study, day day up