Hi, Its nice but as you said its a slightly different context. Of course I can integrate some place information into my RPC mechanism but that does not solve the problem that if n activities get started in parallel each one will do a server request and each one will get a "not authorized" error. I just wanna do that authorization stuff once as it depends on the place and well I only have one place at a time.
I have taken a look into gwt code and it seems the only way to do something once for all activities (based on the place) would be to implement a custom PlaceController that does that work, save the result into the place and then firing the PlaceChangeEvent. But as the PlaceController would have to do a server request you would have a slightly delay between clicking a link in the web app and the actual PlaceChangeEvent that would let the UI react. I think that wouldn't feel nice for the user if the delay gets to big. A second way I can think of would be a shared static variable across all activities that need authorization. The variable would hold something like a AuthorizationContext that the Activity can use to authorize the stuff it needs to authorize. The AuthorizationContext would accumulate requests from all activities per Place and only do the server request once. So I would have something like an AbstractAuthActivity with a method protected void auth(Place place, AuthCallback cb) and would call that method at first in each sub-activitys start method. I think I will try the second approach but maybe there are other ideas? -- J. -- 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/-/RnM2M1VoYzROQXdK. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.