12 Apr 2011 4:04 AM #1
Listen events from a non child Window
This is the situation. I have a class that extends layoutContainer with some buttons which open a different "popUp" Window when clicked. Those Windows, when closed, should reload data in a grid added in the layoutcontainer. I´d like to listen to a custom event fired by the popUps when needed, but as Window is not attached to the layoutContainer (it´s just created and showed) and the method to reload data into grid is on the layoutContainer, adding a listener to that event on the LayoutContainer doesn´t work (because events have to be fired by itself or its children, right?).
The solution of adding a listener directly to the popUp to that specific event (coding that from LayoutContainer) is not possible because those popUps are not always created in the Layoutcontainer (sometimes they´re are created from another popUp).
The workaround I´ve found is to pass a reference to the LayoutContainer in the popUps constructor and change visibility of reloadData method to public, but I´d prefer a more sophisticated method to achieve that result.
By blancomario in forum Ext 3.x: Help & DiscussionReplies: 6Last Post: 1 Jun 2010, 8:16 AM
By alexpetri in forum Ext 3.x: Help & DiscussionReplies: 3Last Post: 12 Nov 2009, 9:24 AM
By jonjanisch in forum Ext GWT: Bugs (2.x)Replies: 1Last Post: 10 Sep 2009, 8:58 AM
By xferron in forum Ext GWT: Bugs (1.x)Replies: 1Last Post: 5 Feb 2009, 2:51 PM