Author: liem_nguyen
Date: 2009-11-05 01:53:50 -0500 (Thu, 05 Nov 2009)
New Revision: 497
Modified:
portal/trunk/component/portal/src/main/java/org/exoplatform/portal/pom/data/Mapper.java
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/UIPortalForm.java
Log:
GTNPORTAL-166 Portal Page inside Container generates an 'Unknown error'.
Modified:
portal/trunk/component/portal/src/main/java/org/exoplatform/portal/pom/data/Mapper.java
===================================================================
---
portal/trunk/component/portal/src/main/java/org/exoplatform/portal/pom/data/Mapper.java 2009-11-05
06:34:54 UTC (rev 496)
+++
portal/trunk/component/portal/src/main/java/org/exoplatform/portal/pom/data/Mapper.java 2009-11-05
06:53:50 UTC (rev 497)
@@ -558,25 +558,22 @@
}
private void build(ContainerData parent, Map<String, String>
hierarchyRelationships)
- {
+ {
String parentId = parent.getStorageId();
- if (parentId != null)
+ for (ModelData child : parent.getChildren())
{
- for (ModelData child : parent.getChildren())
+ String childId = child.getStorageId();
+ if (childId != null)
{
- String childId = child.getStorageId();
- if (childId != null)
+ if (hierarchyRelationships.put(childId, parentId) != null)
{
- if (hierarchyRelationships.put(childId, parentId) != null)
- {
- throw new AssertionError("The same object is present two times in
the object hierarchy");
- }
- if (child instanceof ContainerData)
- {
- build((ContainerData)child, hierarchyRelationships);
- }
- }
+ throw new AssertionError("The same object is present two times in the
object hierarchy");
+ }
}
+ if (child instanceof ContainerData)
+ {
+ build((ContainerData)child, hierarchyRelationships);
+ }
}
}
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-11-05
06:34:54 UTC (rev 496)
+++
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/portal/UIPortalComposer.java 2009-11-05
06:53:50 UTC (rev 497)
@@ -147,7 +147,7 @@
PortalConfig portalConfig =
(PortalConfig)PortalDataMapper.buildModelObject(editPortal);
UserPortalConfigService configService =
getApplicationComponent(UserPortalConfigService.class);
- //configService.update(portalConfig);
+ configService.update(portalConfig);
uiPortalApp.getUserPortalConfig().setPortal(portalConfig);
String remoteUser = prContext.getRemoteUser();
String ownerUser = prContext.getPortalOwner();
Modified:
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/portal/UIPortalForm.java
===================================================================
---
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/portal/UIPortalForm.java 2009-11-05
06:34:54 UTC (rev 496)
+++
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/portal/UIPortalForm.java 2009-11-05
06:53:50 UTC (rev 497)
@@ -132,7 +132,7 @@
setSelectedTab("PortalSetting");
invokeGetBindingBean(Util.getUIPortal());
((UIFormStringInput)getChild(UIFormInputSet.class).getChildById(FIELD_NAME))
-
.setValue(((PortalRequestContext)WebuiRequestContext.getCurrentInstance()).getPortalOwner());
+
.setValue(((PortalRequestContext)WebuiRequestContext.getCurrentInstance()).getPortalOwner());
setActions(new String[]{"Save", "Close"});
}
@@ -204,16 +204,15 @@
UIFormInputSet uiPermissionSetting = createUIComponent(UIFormInputSet.class,
"PermissionSetting", null);
addUIComponentInput(uiPermissionSetting);
-
+
UIListPermissionSelector uiListPermissionSelector =
createUIComponent(UIListPermissionSelector.class, null, null);
uiListPermissionSelector.configure("UIListPermissionSelector",
"accessPermissions");
uiListPermissionSelector.addValidator(EmptyIteratorValidator.class);
uiPermissionSetting.addChild(uiListPermissionSelector);
- uiPermissionSetting.setSelectedComponent(uiListPermissionSelector.getId()) ;
-
-
+ uiPermissionSetting.setSelectedComponent(uiListPermissionSelector.getId());
+
UIPermissionSelector uiEditPermission =
createUIComponent(UIPermissionSelector.class, null, null);
- uiEditPermission.setRendered(false) ;
+ uiEditPermission.setRendered(false);
uiEditPermission.addValidator(org.exoplatform.webui.organization.UIPermissionSelector.MandatoryValidator.class);
uiEditPermission.configure("UIPermissionSelector",
"editPermission");
uiPermissionSetting.addChild(uiEditPermission);
@@ -234,12 +233,17 @@
public void execute(Event<UIPortalForm> event) throws Exception
{
UIPortalForm uiForm = event.getSource();
+ PortalRequestContext prContext = Util.getPortalRequestContext();
+ UIPortalApplication uiPortalApp =
(UIPortalApplication)prContext.getUIApplication();
UIPortal uiPortal = Util.getUIPortal();
uiForm.invokeSetBindingBean(uiPortal);
- //
uiPortal.refreshNavigation(localeConfigService.getLocaleConfig(uiPortal.getLocale()).getLocale())
;
+
//uiPortal.refreshNavigation(localeConfigService.getLocaleConfig(uiPortal.getLocale()).getLocale())
;
PortalConfig portalConfig =
(PortalConfig)PortalDataMapper.buildModelObject(uiPortal);
- UserPortalConfigService configService =
uiForm.getApplicationComponent(UserPortalConfigService.class);
- configService.update(portalConfig);
+ if (uiPortalApp.getModeState() == UIPortalApplication.NORMAL_MODE)
+ {
+ UserPortalConfigService configService =
uiForm.getApplicationComponent(UserPortalConfigService.class);
+ configService.update(portalConfig);
+ }
UIMaskWorkspace uiMaskWorkspace = uiForm.getParent();
uiMaskWorkspace.setUIComponent(null);
event.getRequestContext().addUIComponentToUpdateByAjax(uiMaskWorkspace);
Show replies by date