this happens when the same activity instance is used directly after itself. sounded like this as you said only some params change (plus you might use singletons). take a look at activitymanager src.
you could either register a placechangehandler in that activity and change the contents according to this or wrap another activityprovider. andi (vom fon) On 09.05.2011, at 20:24, Thomas Lefort <[email protected]> wrote: > I forgot to add the problem only occurs for this handler, all the > other ones are using the current Activity. It's really puzzling... > > > On May 9, 5:46 pm, Juan Pablo Gardella <[email protected]> > wrote: >> See javadoc of Activity#start: >> >> Any handlers attached to the provided event bus will be de-registered when >> the activity is stopped, so activities will rarely need to hold on to the >> HandlerRegistration<http://google-web-toolkit.googlecode.com/svn/javadoc/2.1/com/google/g...> >> instances >> returned byEventBus.addHandler(com.google.gwt.event.shared.GwtEvent.Type, >> H)<http://google-web-toolkit.googlecode.com/svn/javadoc/2.1/com/google/g..., >> H)>. >> >> So when you stop, then eventbus is "clean". >> >> http://google-web-toolkit.googlecode.com/svn/javadoc/2.1/com/google/g..., >> com.google.gwt.event.shared.EventBus) >> >> <http://google-web-toolkit.googlecode.com/svn/javadoc/2.1/com/google/g..., >> com.google.gwt.event.shared.EventBus)> >> >> 2011/5/9 Thomas Lefort <[email protected]> >> >> >> >> >> >> >> >>> Hi, >> >>> I use the ResettableEventBus passed to my activity in the start method >>> to register my event handlers for the activity. >>> The way my application works is that each time a "project" is loaded, >>> the activity makes a call to the placeController goTo method to reload >>> the activity with the right project id. This is all done within the >>> same activity type. >>> Before I can load the project I need to wait for resources to be >>> loaded. Once they are loaded I can load the prject itself. I have a >>> handler for that (using a resources loaded event). The problem is that >>> when resources are loaded it is always the handler of the previous >>> activity that is called (except for teh first one), as if the handlers >>> were not properly unregistered when the activity stopped. >> >>> I noticed the ResettableEventBus object is the same across all >>> activities, I would have thought it'd be different. Also I don't call >>> the removeHandlers as it is supposed to be called automatically when >>> the activity is stopped. >>> Could the problem be that I am calling a new activity within the same >>> activity type? >> >>> Has anybody encountered such a problem before? >> >>> Thanks, >> >>> Thomas >> >>> -- >>> You received this message because you are subscribed to the Google Groups >>> "Google Web Toolkit" group. >>> 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. > > -- > You received this message because you are subscribed to the Google Groups > "Google Web Toolkit" group. > 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. > -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. 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.
