Thursday, June 9, 2011

Re: Blocking client side execution until server executes the service completely

It's really not a good idea to stop your user's browser from responding while you're making network calls. They will not thank you for it.

Your life with GWT will be *so* much easier if you just embrace asynchronous behaviour.

Paul

On 09/06/11 07:13, ankit wrote:
> hii to all....im loading data from the server using asynchronous
> callback. so is there any way that i can stop executing client side
> execution until i get data from the server. any way to block
> asynchronous behavior so that i can wait for the data from the
> server....
> this is the example....im using like.. and i dont want JVM to execute
> further till recordSet is not populated..thanx for looking into
> it..hope u will help me out
>
> Service.loadData(mProcedureName, request, new AsyncCallback<Data>() {
>
> public void onFailure(Throwable ex) {
>
> Logger.getLogger(DataServiceImpl.class.getName()).error("Load data
> failed.", ex);
> }
>
> public void onSuccess(Data data) {
> recordSet.setRecords(data);
> }
> });
> }
>

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate