Author: tam_nguyen
Date: 2009-11-27 05:27:22 -0500 (Fri, 27 Nov 2009)
New Revision: 833
Modified:
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/portal/UIPortalComponentActionListener.java
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/portal/UIPortalForm.java
Log:
GTNPORTAL-297 Always show public permission in access permission form of portal when limit
number of access users
Modified:
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/portal/UIPortalComponentActionListener.java
===================================================================
---
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/portal/UIPortalComponentActionListener.java 2009-11-27
10:10:30 UTC (rev 832)
+++
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/portal/UIPortalComponentActionListener.java 2009-11-27
10:27:22 UTC (rev 833)
@@ -521,6 +521,7 @@
UIMaskWorkspace uiMaskWS =
uiApp.getChildById(UIPortalApplication.UI_MASK_WS_ID);
UIPortalForm portalForm = uiMaskWS.createUIComponent(UIPortalForm.class, null,
"UIPortalForm");
portalForm.setPortalOwner(portalName);
+ portalForm.setBindingBean();
uiMaskWS.setWindowSize(700, -1);
event.getRequestContext().addUIComponentToUpdateByAjax(uiMaskWS);
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-27
10:10:30 UTC (rev 832)
+++
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/portal/UIPortalForm.java 2009-11-27
10:27:22 UTC (rev 833)
@@ -132,9 +132,22 @@
super("UIPortalForm");
createDefaultItem();
setSelectedTab("PortalSetting");
- invokeGetBindingBean(Util.getUIPortal());
+
+ }
+
+ public void setBindingBean() throws Exception
+ {
+
+ UserPortalConfigService service =
this.getApplicationComponent(UserPortalConfigService.class);
+ PortalRequestContext prContext = Util.getPortalRequestContext();
+
+ UserPortalConfig userConfig = service.getUserPortalConfig(getPortalOwner(),
prContext.getRemoteUser());
+ UIPortal editPortal = this.createUIComponent(UIPortal.class, null, null);
+ PortalDataMapper.toUIPortal(editPortal, userConfig);
+
+ invokeGetBindingBean(editPortal);
((UIFormStringInput)getChild(UIFormInputSet.class).getChildById(FIELD_NAME))
-
.setValue(((PortalRequestContext)WebuiRequestContext.getCurrentInstance()).getPortalOwner());
+ .setValue(getPortalOwner());
setActions(new String[]{"Save", "Close"});
}
@@ -238,9 +251,15 @@
public void execute(Event<UIPortalForm> event) throws Exception
{
UIPortalForm uiForm = event.getSource();
+
+ UserPortalConfigService service =
uiForm.getApplicationComponent(UserPortalConfigService.class);
PortalRequestContext prContext = Util.getPortalRequestContext();
+
+ UserPortalConfig userConfig =
service.getUserPortalConfig(uiForm.getPortalOwner(), prContext.getRemoteUser());
+ UIPortal uiPortal = uiForm.createUIComponent(UIPortal.class, null, null);
+ PortalDataMapper.toUIPortal(uiPortal, userConfig);
+
UIPortalApplication uiPortalApp =
(UIPortalApplication)prContext.getUIApplication();
- UIPortal uiPortal = Util.getUIPortal();
uiForm.invokeSetBindingBean(uiPortal);
//uiPortal.refreshNavigation(localeConfigService.getLocaleConfig(uiPortal.getLocale()).getLocale())
;
if (uiPortalApp.getModeState() == UIPortalApplication.NORMAL_MODE)
Show replies by date