First, once removed, your listeners will not be fired. Second, I would suggesting looking at DeckPanel for your right-hand side panel. >From what it sounds like, if the user selects menu item "A" on the left, then a panel is displayed on the right. If they select "B", the "A" panel goes away, and is replaced by a "B" panel. However, if "A" is selected again, the "A" panel reappears on the right (replacing "B"). If that is indeed the case, consider DeckPanel, where "A" is simply "hidden" to show "B", or "B" is hidden to show "A". You can leave your listeners connected and they will again become active when that panel is surfaced.
-Brett On Jun 30, 9:13 pm, Ed <[email protected]> wrote: > I am trying to have a better understanding of the DOM Tree in relation > with events. A few questions about that: > Suppose I have a left menu that shows screen parts on the right side. > If I select a menu item, I will create the screen part and leave it > created during the whole application live cycle. > > 1) If another menu item is created, where is the previous selected > screen parts located on the DOM?... How does that work... It's a bit > unclear to me where something is located on the DOM.. > Info: selecting a screen parts occurs by adding/removing a panel to > the RootPanel. > > 2) If another menu item is created, what happens with the events and > listeners that are used by the widgets that are contained in the > previous selected screen part (that is unselected)...? > Does the widgets on the unselected screen parts still receive events? > Should I remove the widgets listeners in the onUnload and add them > again in the onLoad method to improve performance?..... > > Cheers, > Ed --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
