Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.programmer > #29868 > unrolled thread
| Started by | J-23 <baczeklu@o2.pl> |
|---|---|
| First post | 2014-08-28 21:33 +0200 |
| Last post | 2014-08-28 21:33 +0200 |
| Articles | 1 — 1 participant |
Back to article view | Back to comp.lang.java.programmer
RPCProxy and gwt-dispatch J-23 <baczeklu@o2.pl> - 2014-08-28 21:33 +0200
| From | J-23 <baczeklu@o2.pl> |
|---|---|
| Date | 2014-08-28 21:33 +0200 |
| Subject | RPCProxy and gwt-dispatch |
| Message-ID | <lto06e$pdk$1@node1.news.atman.pl> |
Hi!
I'm trying to do a little something in GXT and I want to use List from
GXT and RPCProxy.
Let's say I have a bean class of Foo. I have an action called
ListFooAction and result associated with it - ListFooResult.
ListFooAction is empty, since I want to list all my Foo's, and
ListFooResult contains a list of all Foo objects - List<Foo>.
Now what I'd like to do, is to load my foo objects using gwt-dispatch
inside RPCProxy load method. After looking into GXT list examples, I
assume my RPCProxy should be like this: RPCProxy<List<Foo>>. I have to
provide implementation for abstract method - load:
Override
protected void load(Object loadConfig, AsyncCallback<List<Foo>> callback) {
}
};
Now I'd like to execute my ListFooAction using DispatchAsync inside that
method to load all my Foo objects. Doing so, I would have an
AsyncCallback<ListFooResult>. But RPCProxy load method has
AsyncCallback<List<Foo>>, and I have List<Foo> inside my FooResult. How
can I "transfer" list from my result to the callback from the load
method? Is this possible? Or maybe there is better approach to achieve
what I'm trying to do?
Regards
Back to top | Article view | comp.lang.java.programmer
csiph-web