• Post Reply Bookmark Topic Watch Topic
  • New Topic

Grid with Ext-GWT (GXT) and RPC - call  RSS feed

 
Rami Khalfallah
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi All )

I'm new on Google technologies
Based on this tutorial I've created a static grid.

but when i change the getInterventions() to communicate with the server and get a list of Intervention to be shown on the grid

here is my IntervGrid.java


My server side code :



I don't get any Errors or Exceptions
May be A logic problem

System.out.println("taille du Grid ="+IntervGrid.x.size()); here i get 32 inside the onsuccess() method
System.out.println("taille du Grid final ="+IntervGrid.x.size()); but here i get 0 outside onsuccess() method

Any Ideas ???
Thanks So much
 
Maneesh Godbole
Bartender
Posts: 11445
18
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In future, while posting code, please UseCodeTags. I have edited your post and added them. As you can see it makes the code easier to read and understand.
Also, please read the private message I just sent you.

I am not sure I am getting your question. Do you mean your UI is not reflecting the fresh data after the server call?
 
Rami Khalfallah
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
well yes i get nothing on my grid check my System.out.println() that's what i get
 
Maneesh Godbole
Bartender
Posts: 11445
18
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Disclaimer: I haven't worked with GXT/Ext-GWT

You call store.add(getInterventions());
Then you build and return your grid which is added to the parent container.
However, the getInterventions() uses a RPC call which is asynchronous. What it means is when your call to getInterventions() return, the List is not yet populated! Do you see the problem now?
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!