I know this is more a GWT question, but I´ll appreciate any idea about this issue. Of course, I´ve posted this on GWT forums too.
I´m building a webapp which, depending on the user, will show some options on the menu or other ones. For doing this, I invoke a Single Singed On method passing as arguments, the user and the application and getting as return value a string identifying the "role" of the user. As I´m using GWT, I can´t invoke the SSO method from the client side, so I have to make a RPC to the server, which will invoke the method and return the "role" to the client.
I do all of this before "start creating the widgets that will be showed", but I face the problem of asyncronous calls.
I invoke the RPC, but the return value may come late (by late I mean when it has already started "building the widgets and appearance of the web application".
The only solution I see (and I don´t know if it´s correct or even possible) is start the building part in the body of "onSuccess(String result)" method, of the callback method associated to the RPC call.
I don´t know if I explanied it right...but I hope so.