UIComponent emitting UI event should be retreived via Event<> object
--------------------------------------------------------------------
Key: GTNPORTAL-1719
URL:
https://jira.jboss.org/browse/GTNPORTAL-1719
Project: GateIn Portal
Issue Type: Task
Security Level: Public (Everyone can see)
Reporter: Minh Hoang TO
In many implementations of EventListener in the UI Layer, i see code snippet analogous to
this
{code:java}
public void execute(Event<UIWorkingWorkspace> event) throws Exception
{
UIPortalApplication uiApp = Util.getUIPortalApplication();
UIWorkingWorkspace uiWorkingWS =
uiApp.getChildById(UIPortalApplication.UI_WORKING_WS_ID);
.....
}
{code}
Here, to get the object emitting event, the top-level component UIPortalApplication is
retrieved, then a search over children with ID is used. The event.getSource() should be
used instead
--
This message is automatically generated by JIRA.
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira