in my application most activities rely on infos provided by current place. 
all infos of such place define the state of activity. the problem is that 
all infos are provided as strings and must be resolved to objects (i.e. 
userID=0815 must be resolved to a user object). In my case many activities 
share such a state (ShowUserActivity, SelectUserActivity both need 
"current(Selected)User"). At the moment the code to resolve a state is 
redundant across those activities -- very bad.

So i want to centralize each kind of state. In many cases async. services 
are needed to resolve the infos. So how is a good way to centralize this 
asynchronous process? One Idea i have in mind is to let this class hear 
PlaceChangeEvents to update itself. Because of the asynchronous nature of 
the update i probably need a UpdateStateEvent and each activity must 
register to it.

But is there a way to defer the loading of an activity 'til state is 
resolved (there is no need to start the activity). Or in general is there a 
way to make asynchronous calls synchronous by deferring until 
"onSuccess"/"onFailure"? 
Or this all is probably bullshit and you have a better idea to solve this 
kind of problem? 

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/go98sXST0zoJ.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.

Reply via email to