• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Tim Cooke
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Knute Snortum
  • paul wheaton
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Ron McLeod
  • Piet Souris
  • Ganesh Patekar
Bartenders:
  • Tim Holloway
  • Carey Brown
  • salvin francis

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

 
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
 
Bartender
Posts: 11445
18
Android Google Web Toolkit Mac Eclipse IDE Ubuntu Java
  • 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 Google Web Toolkit Mac Eclipse IDE Ubuntu Java
  • 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?
 
expectation is the root of all heartache - shakespeare. tiny ad:
Enterprise-grade Excel API for Java
https://products.aspose.com/cells/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!