Friday, November 29, 2013

Re: What is the simplest way to show “loading indicator” during an RPC call in GWTP?

We do exactly what you describe and it works fine.  However, we don't use GWTP.  Our code looks very similar to yours.  The presenter (activity) initiates the query and invokes the dialog and hides it when the callback returns.

Maybe GWTP is doing something in the interim.


On Saturday, October 26, 2013 2:21:57 AM UTC-7, Tom wrote:

I am using GWTP to build my webapp. Here is my problem. I have a customer page (CustPresenter). When that page is visited, it will call & load Data from Database.

It may take a while to load all data, so I want my current Browser locked so that the user can not click any things while data has not finished downloading yet.

So here is what I am thinking. I want to show a DialogBox right before I make the RPC call & hide it when the call finishes. Look at the below code:

public class CustPresenter extends      Presenter<CustPresenter.MyView, CustPresenter.MyProxy> {        private DialogBox loadingDialogBox=new DialogBox();        @Inject DispatchAsync dispatchAsync;        @Override      public void prepareFromRequest(PlaceRequest request){           super.prepareFromRequest(request); ;           GetData getDataAction=new GetData();           dispatchAsync.execute(getDataAction, getDataCallback);        }        private AsyncCallback<GetDataResult> getDataCallback=new AsyncCallback<GetDataResult>(){            @Override          public void onFailure(Throwable caught) {              loadingDialogBox.hide();          }            @Override          public void onSuccess(GetVerbFromTripleResult result) {               //show data here (it may take long time)               loadingDialogBox.hide();          }     };  }  

However, when runing, the dialogbox only shows up for 1 second & then disappears. Right After that all the UiBinder Guis show up on the Customer Page & user can click any buttons on the page while the data has not finished downloading yet. This is not a correct behavior.

I want to do something like this!2/a2581/1. As u can see, when u first time open that link, a loading panel popups & u can't click anything until all guis show up.

So, why do I have this problem?

How to fix it?

Or generally, What is the simplest way to show "loading indicator" during an RPC call in GWTP?

You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
To post to this group, send email to
Visit this group at
For more options, visit

No comments:

Post a Comment