Welcome to the Official BlackBerry® Support Community Forums. This is your resource to discuss support topics with your peers, and learn from each other. New to the forum? Please visit the ‘Getting Started’ link below.
inside custom component

Java Development

Reply
Trusted Contributor
kaibaseto
Posts: 121
Registered: 01-19-2011
My Carrier: engineer

refresh Screen

a have a question i create a list after to load a screen but when i add this listfield i have that  UiEngineImpl.assertHaveEventLock how i can refresh my screen???

Please use plain text.
Developer
arkadyz
Posts: 2,146
Registered: 07-08-2009
My Carrier: various

Re: refresh Screen

This is not exactly "refresh" - this is more about making changes to the Screen which is already displayed. Such changes are best done on the Event Thread. Once you add your list to the screen, it will re-layout and refresh automatically.

Here is the most common way to get it done:

 

UiApplication.getUiApplication().invokeLater(new Runnable() {
  public void run() {
    yourScreen.add(yourList);
  }
});

 

 

----------------------------------------------------------
please click 'Accept Solution' on posts that provide the solution to the question you've posted. Don't say "Thanks", press 'Like' button instead!
Please use plain text.