Shaselai,
There should be no "racing" condition, the only thing I can guess is
that you're trying to use the result from the server call in your code
to initialize the page.  The data from a server RPC call is highly
unlikely to be available a that time.  The correct method is for the
asynchronous callback to fill in the previously created listbox, which
ensures that there is no race.  For example:

public class MyPage extends Composite {
  ListBox lbox;

  public MyPage() {
     lbox = new ListBox();
     //add listbox to page
     rpcservice.getListBoxItems(args, lboxCb);
     ...
  }

  AsyncCallback<List<String>> lboxCb = new
AsyncCallback<List<String>>() {
    public void onSuccess(List<String> result) {
      lbox.clear();
      for (String item : result) {lbox.addItem(item);}
    }
    public void onFailure(Exception ex) {}
  };
}

Remember, GWT builds everything dynamically, so there is no real
"refresh" concept like you mention.

jk
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to