>
>
> Regarding accessing results of a callback elsewhere in the application (if 
> required), what is the best way to do this?
>

Somewhat depends on the concrete case. 

If its very general data that multiple independent components are 
interested in, you could publish that data on an app global EventBus using 
an event. Sometimes you can also store general data somewhere and then 
provide that information through a constructor dependency in other classes. 
For example a client side "UserSession" class could be a dependency in 
multiple app components and filled once by the login process.

If its more like a parent <-> child relationship (1:n) the child could hold 
a reference to the parent and notify it by calling a method on the parent. 
But try to avoid it through multiple layers so you dont end up with 
getParent().getParent().getParent().notify(). You can also use events in a 
parent <-> child scenario to decouple both but I would not send that event 
on the EventBus as its probably relative specific to the parent and child.

Just start hacking and once you feel uncomfortable with the code just ask 
again with a more concrete scenario.

-- J.

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to