Author: mwringe
Date: 2011-08-24 15:24:13 -0400 (Wed, 24 Aug 2011)
New Revision: 7214
Modified:
epp/portal/branches/EPP_5_2_Branch/webui/portal/src/main/java/org/exoplatform/portal/webui/page/UIPageBrowser.java
Log:
JBEPP-1107: Merge in patch from GTNPORTAL-2008. This will only allow creating portal and
group pages and not user pages (which are not yet accessible).
Modified:
epp/portal/branches/EPP_5_2_Branch/webui/portal/src/main/java/org/exoplatform/portal/webui/page/UIPageBrowser.java
===================================================================
---
epp/portal/branches/EPP_5_2_Branch/webui/portal/src/main/java/org/exoplatform/portal/webui/page/UIPageBrowser.java 2011-08-24
18:55:21 UTC (rev 7213)
+++
epp/portal/branches/EPP_5_2_Branch/webui/portal/src/main/java/org/exoplatform/portal/webui/page/UIPageBrowser.java 2011-08-24
19:24:13 UTC (rev 7214)
@@ -23,6 +23,8 @@
import java.util.List;
import java.util.ResourceBundle;
+import javassist.bytecode.analysis.Type;
+
import javax.portlet.ActionResponse;
import javax.xml.namespace.QName;
@@ -423,12 +425,22 @@
UIPageForm uiPageForm = uiMaskWS.createUIComponent(UIPageForm.class,
"UIBrowserPageForm", "UIPageForm");
uiMaskWS.setUIComponent(uiPageForm);
uiMaskWS.setShow(true);
-
uiPageForm.getUIStringInput("ownerType").setValue(PortalConfig.USER_TYPE);
-
uiPageForm.getUIStringInput("ownerId").setValue(prContext.getRemoteUser());
- uiPageForm.removeChildById("PermissionSetting");
uiPageForm.removeChild(UIFormInputItemSelector.class);
UIPageTemplateOptions uiTemplateConfig =
uiPageForm.createUIComponent(UIPageTemplateOptions.class, null, null);
uiPageForm.addUIFormInput(uiTemplateConfig);
+ UIFormSelectBox slcOwnerType =
uiPageForm.getUIFormSelectBox(UIPageForm.OWNER_TYPE);
+ List<SelectItemOption<String>> types = slcOwnerType.getOptions();
+ for (int i = 0; i < types.size(); i++)
+ {
+ if (PortalConfig.USER_TYPE.equals(types.get(i).getValue()))
+ {
+ types.remove(types.get(i));
+ break;
+ }
+ }
+ slcOwnerType.setOptions(types);
+ Event<UIComponent> slcEvent =
uiPageForm.createEvent("ChangeOwnerType", Phase.DECODE,
event.getRequestContext());
+ slcEvent.broadcast();
prContext.addUIComponentToUpdateByAjax(uiMaskWS);
}
}