Want to do synchronous things with asynchronous elements

2010-10-18 Thread Frédéric
Hello everybody I need your help. Before to insert values in a database I have to check if some values are not in the DB. So I have to count the number of time this value appears in the DB. If the number of value is greater than 0, I am supposed to stay on the same screen But as we work

Re: Want to do synchronous things with asynchronous elements

2010-10-18 Thread Jeff Larsen
You have to setup your "change of screen" code to listen for the onSuccess method inside you're AsynCallback. For example saveButton.addClickHandler(new ClickHandler(){ public void onClick(ClickEvent event){ someAsyncService.save(createObjectToSave(), new AsyncCallback(){

Re: Want to do synchronous things with asynchronous elements

2010-10-19 Thread Frédéric MINATCHY
Thank you for your reply but with this solution it seems that I am forced to interlink several anonymous classes... For example : saveButton.addClickHandler(new ClickHandler(){ public void onClick(ClickEvent event){ someAsyncService.*checkData*(valueToCheck, new AsyncCallback(){

Re: Want to do synchronous things with asynchronous elements

2010-10-19 Thread gaill...@audemat.com
Search for AbstractAsyncCallback on Google You can have a strict queue of AsyncCallback -- 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-tool...@googlegroups.com. To unsubscribe from this grou

Re: Want to do synchronous things with asynchronous elements

2010-10-19 Thread Frédéric MINATCHY
It's a good idea to use a START and END event in the RPC method... But I won't have the time to implement it... I will think about it when I will have the time. Thank you Jeff... I implemented it by interlinking anonymous classes...it works. I don't like it but I won't have time to think more abou