Thanks for the replies. It helped a lot and could have saved me a
couple of hours if I had know earlier...
> I have just done it with a transparent image, it works perfectly :
> button.addClickListener(new ClickListener() {
> public void onClick(Widget sender) {
> image.setVisible(true);
> TestSynchronousAsync testSynchronous =
> TestSynchronous.Util.getInstance();
> AsyncCallback asyncCallback = new AsyncCallback(){
> public void onFailure(Throwable caught) {
> image.setVisible(false);
> }
> public void onSuccess(Object result) {
> image.setVisible(false);
> }};
> testSynchronous.sayHello(asyncCallback);
> }});
> On Mar 9, 10:27 pm, "dgirard" <didier.gir...@gmail.com> wrote:
> > I think you can put a transparent div just before the asynchronous
> > call. This div will catch all the event from the user.
> > You remove the div on success or failure.
> > Didier
> > On Mar 9, 4:51 pm, "rapsli" <raphaelschae...@gmail.com> wrote:
> > > Hello
> > > Following code snipped:
> > > public String[] getCompletionItems(String str){
> > > System.out.println("Zeile 26");
> > > AsyncCallback callback = new AsyncCallback() {
> > > public void onSuccess (Object result)
> > > {
> > > System.out.println("Zeile 30");
> > > s = (String[])result;
> > > }
> > > public void onFailure (Throwable ex)
> > > {
> > > //RootPanel.get().add(new HTML(ex.toString()));
> > > RootPanel.get("autocomp").add(new HTML(ex.toString()));
> > > }
> > > };
> > > async.getAutocompletion(str, callback);
> > > System.out.println("Zeile 41");
> > > return s;
> > > }
> > > Output:
> > > Zeile 26
> > > Zeile 41
> > > Zeile 30
> > > So for the return value I always get the value from the last call of
> > > the method. How can I assure, that the RPC method is called and answer
> > > is waited for? I hope someone has a some good advice.
> > > rapsli- Zitierten Text ausblenden -
> - Zitierten Text anzeigen -