[gatein-commits] gatein SVN: r5644 - in portal/branches/branch-GTNPORTAL-1731/webui/portal/src/main/java/org/exoplatform/portal/webui: workspace and 1 other directory.
do-not-reply at jboss.org
do-not-reply at jboss.org
Fri Dec 24 06:14:01 EST 2010
Author: phuong_vu
Date: 2010-12-24 06:14:01 -0500 (Fri, 24 Dec 2010)
New Revision: 5644
Modified:
portal/branches/branch-GTNPORTAL-1731/webui/portal/src/main/java/org/exoplatform/portal/webui/portal/UIPortal.java
portal/branches/branch-GTNPORTAL-1731/webui/portal/src/main/java/org/exoplatform/portal/webui/workspace/UIMainActionListener.java
Log:
GTNPORTAL-1719 UIComponent emitting UI event should be retreived via Event<> object
Modified: portal/branches/branch-GTNPORTAL-1731/webui/portal/src/main/java/org/exoplatform/portal/webui/portal/UIPortal.java
===================================================================
--- portal/branches/branch-GTNPORTAL-1731/webui/portal/src/main/java/org/exoplatform/portal/webui/portal/UIPortal.java 2010-12-24 10:01:14 UTC (rev 5643)
+++ portal/branches/branch-GTNPORTAL-1731/webui/portal/src/main/java/org/exoplatform/portal/webui/portal/UIPortal.java 2010-12-24 11:14:01 UTC (rev 5644)
@@ -461,7 +461,7 @@
{
public void execute(Event<UIPortal> event) throws Exception
{
- UIPortal uiPortal = Util.getUIPortal();
+ UIPortal uiPortal = event.getSource();
UIPortalApplication uiApp = uiPortal.getAncestorOfType(UIPortalApplication.class);
UIMaskWorkspace uiMaskWS = uiApp.getChildById(UIPortalApplication.UI_MASK_WS_ID);
Modified: portal/branches/branch-GTNPORTAL-1731/webui/portal/src/main/java/org/exoplatform/portal/webui/workspace/UIMainActionListener.java
===================================================================
--- portal/branches/branch-GTNPORTAL-1731/webui/portal/src/main/java/org/exoplatform/portal/webui/workspace/UIMainActionListener.java 2010-12-24 10:01:14 UTC (rev 5643)
+++ portal/branches/branch-GTNPORTAL-1731/webui/portal/src/main/java/org/exoplatform/portal/webui/workspace/UIMainActionListener.java 2010-12-24 11:14:01 UTC (rev 5644)
@@ -54,7 +54,7 @@
public void execute(Event<UIWorkingWorkspace> event) throws Exception
{
UIPortalApplication uiApp = Util.getUIPortalApplication();
- UIWorkingWorkspace uiWorkingWS = uiApp.getChildById(UIPortalApplication.UI_WORKING_WS_ID);
+ UIWorkingWorkspace uiWorkingWS = event.getSource();
// check edit permission for page
UIPageBody pageBody = uiWorkingWS.findFirstComponentOfType(UIPageBody.class);
@@ -107,7 +107,7 @@
{
UIPortalApplication uiApp = Util.getUIPortalApplication();
uiApp.setModeState(UIPortalApplication.APP_BLOCK_EDIT_MODE);
- UIWorkingWorkspace uiWorkingWS = uiApp.getChildById(UIPortalApplication.UI_WORKING_WS_ID);
+ UIWorkingWorkspace uiWorkingWS = event.getSource();
if (!hasPageCreationPermission())
{
@@ -165,8 +165,7 @@
//Todo nguyenanhkien2a at gmail.com
//Check editing permission
UIPortalApplication portalApp = Util.getUIPortalApplication();
- UIPortal currentUIPortal = portalApp.<UIWorkingWorkspace>findComponentById(
- UIPortalApplication.UI_WORKING_WS_ID).findFirstComponentOfType(UIPortal.class);
+ UIPortal currentUIPortal = event.getSource().findFirstComponentOfType(UIPortal.class);
UserACL userACL = portalApp.getApplicationComponent(UserACL.class);
if(!userACL.hasEditPermissionOnPortal(currentUIPortal.getOwnerType(), currentUIPortal.getOwner(),
currentUIPortal.getEditPermission()))
@@ -177,7 +176,7 @@
}
PortalRequestContext pcontext = (PortalRequestContext)event.getRequestContext();
- UIWorkingWorkspace uiWorkingWS = uiApp.getChildById(UIPortalApplication.UI_WORKING_WS_ID);
+ UIWorkingWorkspace uiWorkingWS = event.getSource();
uiWorkingWS.setBackupUIPortal(uiPortal);
uiApp.setModeState(UIPortalApplication.APP_BLOCK_EDIT_MODE);
More information about the gatein-commits
mailing list