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

Regular Contributor
Posts: 74
Registered: ‎01-12-2012
My Device: Developer
My Carrier: Developer
Accepted Solution

Delete or Empty Horizontal/Vertical/Managers in a Synchronous block

Is possible to empty the content of a manager after a period of adding it to the screen.
My screen is made up of 3 part. top/middle/bottom ... i would like only to change the content of the middle part, without having to switch to anyother page.
I used to use Synchronous Block and a TimerTask, to update my screen...but this only updates found content !
if I had an image i was able to update it with a new image ( not an other object of different type )! however If I wanted to change the WHOLE layout of my middle manager, how can I do so ?


Thanks in advance...

screen(){                  /// my screen constructor (extends mainscreen)

//manager top



//manager middle



//manager bottom 





add(bottom );


Functions.tt=new TimerTask() {
public void run() {

synchronized(UiApplication.getEventLock()) {

// my code that updates

// is there a way to empty the content of the middle manager and add new content ???

t.scheduleAtFixedRate(Functions.tt, 100, 100);



Thank you  

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

Re: Delete or Empty Horizontal/Vertical/Managers in a Synchronous block

replace it with another manager. or call deleteAll and add the fields you want.

better use invokelater than sync on the eventlock.
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
Posts: 30
Registered: ‎02-02-2012
My Device: 9780
My Carrier: DU. UAE

Re: Delete or Empty Horizontal/Vertical/Managers in a Synchronous block

use mainManager.deleteAll() and addthe new fields to this mainManager. Try this, it works for me.


Thanks and Regards,

  Meera Manesh