aspose file tools*
The moose likes GWT and the fly likes Grid with Ext-GWT (GXT) and RPC - call Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » GWT
Bookmark "Grid with Ext-GWT (GXT) and RPC - call " Watch "Grid with Ext-GWT (GXT) and RPC - call " New topic
Author

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

Rami Khalfallah
Greenhorn

Joined: Jul 28, 2011
Posts: 3
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
Saloon Keeper

Joined: Jul 26, 2007
Posts: 10403
    
    8

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?


[How to ask questions] [Donate a pint, save a life!] [Onff-turn it on!]
Rami Khalfallah
Greenhorn

Joined: Jul 28, 2011
Posts: 3
well yes i get nothing on my grid check my System.out.println() that's what i get
Maneesh Godbole
Saloon Keeper

Joined: Jul 26, 2007
Posts: 10403
    
    8

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?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Grid with Ext-GWT (GXT) and RPC - call