How to solve waiting for RPC response in GWT? -


i know rpc asynchronous how can in other way (other waiting response) solve problem:

public static string htsl(string sentence) {     final databaseasync db = gwt.create(database.class);     string cookie = staticcontent.getcookie("ll");     string shortcut = cookie.split("/")[1];     final string[] lala = new string[1];     database.gettranslated(sentence, shortcut, new asynccallback<string>() {            @override         public void onsuccess(string result) {             lala[0]=result;              //this result want return in static function htsl... ?          }          @override         public void onfailure(throwable caught) {             // todo auto-generated method stub          }       });     //here have blank result, because rpc slower te return..      , have blank result     return lala[0];  } 

i know not good, but.. if no working solution this, how wait response?

make htsl asynchronous (non-blocking, i.e. callack response rather return value)


Comments

Popular posts from this blog

How to mention the localhost in android -

php - Calling a template part from a post -

c# - String.format() DateTime With Arabic culture -