On Tue, Oct 4, 2011 at 6:53 PM, Ashton Thomas <[email protected]> wrote:
> My understanding is that the simple solution below would work. Is this
> correct?
>
> service.getStuff(new AsyncCallback<ThisThat>(){
> public void onSuccess(result){
> updateStuff(result);
> }
> }
>
> public void updateStuff(ThisThat obj){
> //execute A
> //execute B
> }
>
I don't use GWT-RPC but RequestFactory. My case is the following:
void getStuff() {
final SessionRequest proxyReq =
Common.mainRequestFactory.sessionRequest();
final Request<List<SessionProxy>> req =
proxyReq.getSessionsOfUserAndDate(userId, Common.getNow());
req.fire(new Receiver<List<SessionProxy>>() {
@Override
public void onSuccess(List<SessionProxy> response) {
doCompletelyOtherStuff();
}
});
}
void doStuff(AbsolutePanel mainPanel) {
}
*void executeAllTheseStuff() {*
* doStuff(); // this should be necessarily executed first, and only if
this method has been executed...*
* getStuff(); // ...I want getStuff() being executed*
*}*
...it's that "simple".
--
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.