Author: truong.le
Date: 2009-12-02 03:11:58 -0500 (Wed, 02 Dec 2009)
New Revision: 898
Modified:
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/portal/UIPortalComposer.java
Log:
GTNPORTAL-329: Show exception when click Abort in case edit layout of new portal
Modified:
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/portal/UIPortalComposer.java
===================================================================
---
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/portal/UIPortalComposer.java 2009-12-02
07:16:28 UTC (rev 897)
+++
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/portal/UIPortalComposer.java 2009-12-02
08:11:58 UTC (rev 898)
@@ -318,23 +318,18 @@
UIPortal uiPortal = (UIPortal)siteBody.getUIComponent();
String uri = null;
- if (uiPortal == null)
- {
+ String remoteUser = prContext.getRemoteUser();
+ String ownerUser = prContext.getPortalOwner();
+ if(uiEditPortal != null && uiEditPortal.getOwner().equals(ownerUser))
uri = (uiEditPortal.getSelectedNode() != null) ?
uiEditPortal.getSelectedNode().getUri() : null;
- UserPortalConfigService configService =
uiPortalApp.getApplicationComponent(UserPortalConfigService.class);
- String remoteUser = prContext.getRemoteUser();
- String ownerUser = prContext.getPortalOwner();
- UserPortalConfig userPortalConfig =
configService.getUserPortalConfig(ownerUser, remoteUser);
- UIPortal newPortal = uiWorkingWS.createUIComponent(UIPortal.class, null,
null);
- PortalDataMapper.toUIPortal(newPortal, userPortalConfig);
- siteBody.setUIComponent(newPortal);
- }
- else
- {
- siteBody.setUIComponent(uiEditPortal);
- }
- // uiEditWS.setUIComponent(null);
- // uiWorkingWS.removeChild(UIEditInlineWorkspace.class);
+ else if(uiPortal != null)
+ uri = (uiPortal.getSelectedNode() != null) ?
uiPortal.getSelectedNode().getUri() : null;
+
+ UserPortalConfigService configService =
uiPortalApp.getApplicationComponent(UserPortalConfigService.class);
+ UserPortalConfig userPortalConfig = configService.getUserPortalConfig(ownerUser,
remoteUser);
+ UIPortal newPortal = uiWorkingWS.createUIComponent(UIPortal.class, null, null);
+ PortalDataMapper.toUIPortal(newPortal, userPortalConfig);
+ siteBody.setUIComponent(newPortal);
uiWorkingWS.getChild(UIEditInlineWorkspace.class).setRendered(false);
uiPortal = (UIPortal)siteBody.getUIComponent();
Show replies by date