rpc call

10 views
Skip to first unread message

tong123123

unread,
Mar 19, 2012, 3:22:52 AM3/19/12
to google-we...@googlegroups.com
as gwt has no java pattern class and so I want to use server validation, at first, my code is
if (!validate()_{

}else{
  retrieveData();
}

the validate() method is only client side validation first, but now I need add rpc server validation test, so I think if the server validation rpc call is non-blocking, then maybe
there is server validation error, but the client side code already run to the else part and run retrieveDate(), any method to ensure the validate() method is completed before retrieveData() is called?

dodo dard

unread,
Mar 19, 2012, 8:05:22 AM3/19/12
to google-we...@googlegroups.com
No I think there is no method that can do that, the RPC is asynchronous. You should create a callback and retrieveData in the callback instead.

Bowie
=================
Reply all
Reply to author
Forward
0 new messages