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

Java Development

Reply
Developer
Posts: 129
Registered: ‎09-21-2009
My Device: Not Specified

back button causes page reload

Currently I have 3 screens, A, B, C

 

I login using A which takes me to B.  I then navigate to C.  If i press the back button on the phone, it brings up page B, however it loads again.  I want it to just show the page.  I was under the impression the the back button will just display the previous page on the stack.  Is there a way to stop the page reloading?

Developer
Posts: 1,474
Registered: ‎04-14-2009
My Device: Not Specified

Re: back button causes page reload

Depends on how you coded screen B. May be you are (re)loading something in that screen inside onVisibilityChange or onExposed/onObscured...
Developer
Posts: 129
Registered: ‎09-21-2009
My Device: Not Specified

Re: back button causes page reload

Thanks for the reply.  My page is set up quite simply in the following way,

 

 

public class portfolioOverviewScreen extends MainScreen{
       
    public portfolioOverviewScreen() {    
        super();

Is there something I should be doing to prevent the page from reloading when back button pressed?  

 

 

 

Developer
Posts: 3,951
Registered: ‎07-15-2008
My Device: Not Specified

Re: back button causes page reload

From screen C, you just close/pop the Screen C the previous screen B is visible. I guess you are pushing the screenB from C again by creating new object of B? 


Use Search. "Accept Solution" If the problem is resolved.