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
Contributor
Posts: 49
Registered: ‎05-02-2012
My Device: Bold 9790
My Carrier: Wind Mobile
Accepted Solution

Refresh screen when it becomes first on the stack

Hi there,

 

I have a refresh function on my home screen, from the home screen a user can change options in the options screen. However changing the options will change the content on the home screen. How can I update the home screen when a user has just changed options? I was thinking that it would update when it is first on the stack again since that would mean the option screen has been removed from the stack... Any guidance would be appreciated!

 

Thank you,

Ben

Developer
Posts: 19,636
Registered: ‎07-14-2008
My Device: Not Specified

Re: Refresh screen when it becomes first on the stack

In this circumstance, the easiest option is to use a pushModal on the Options Screen.  Then your processing will stop at that point, and you will get control back when the Options screen is closed - then you can refresh whatever you like. 

 

There are other options if this does not work for you, have a look at this Thread:

http://supportforums.blackberry.com/t5/Java-Development/OnExposed-method-problem/td-p/1870827

New Developer
Posts: 108
Registered: ‎01-23-2012
My Device: torch,bold,curve,strom
My Carrier: Blackberry

Re: Refresh screen when it becomes first on the stack

you can write down the refreshing code in the onExpose method of your class.

Thanks & Regards,
Kumar Shivam
Developer
Posts: 19,636
Registered: ‎07-14-2008
My Device: Not Specified

Re: Refresh screen when it becomes first on the stack

As onExposed() gets called in other circumstances when a refresh is not needed, I would not recommend that you do this without some sort of filter to determine whether you should or not.  Review the Thread I pointed you at, in there I suggest a suitable filter you might use.  . 

Contributor
Posts: 49
Registered: ‎05-02-2012
My Device: Bold 9790
My Carrier: Wind Mobile

Re: Refresh screen when it becomes first on the stack

I just used the onExposed() method and it seems to work fine Smiley Happy