Woops... Missclicked :/
Let's try again:
------
Thomas and Christian already gave you useful answers.
I want to add the following:
- As of now, Javascript is single threaded , so you don't have
concurrency problems. So you know the onSuccess() method of your RPC
services can not be run concurrently, and you may then use boolean
flags to know whether you already got the other RPC response.
There are some talks of making JavaScript multi-threaded with worker
threads (
https://developer.mozilla.org/En/Using_web_workers ), but
you don't have to worry about that now.
- If you are interested in reducing your app's startup time, you could
avoid the 2 additionnal http requests from the RPC calls by "pre-
loading" the RPC data in your HTML host page, as explained here:
http://www.techhui.com/profiles/blogs/simpler-and-speedier-gwt-with
This technique needs some setup, but it seems like it would be perfect
for your use case.
- If your RPC calls fetch some really simple data like the current
user's nickname/firstname/lastname, you could simply embed this data
inside a javascript variable in your host page, and access it by using
a GWT dictionary.
Regards,
- Etienne