Author: hoang_to
Date: 2010-06-09 00:09:26 -0400 (Wed, 09 Jun 2010)
New Revision: 3263
Modified:
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/page/UIPageNodeForm.java
Log:
GTNPORTAL-1303: For system nodes: do not allow to change the visibility
Modified:
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/page/UIPageNodeForm.java
===================================================================
---
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/page/UIPageNodeForm.java 2010-06-09
03:36:40 UTC (rev 3262)
+++
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/page/UIPageNodeForm.java 2010-06-09
04:09:26 UTC (rev 3263)
@@ -27,6 +27,7 @@
import org.exoplatform.portal.config.model.PageNavigation;
import org.exoplatform.portal.config.model.PageNode;
import org.exoplatform.portal.config.model.PortalConfig;
+import org.exoplatform.portal.mop.Visibility;
import org.exoplatform.portal.webui.navigation.PageNavigationUtils;
import org.exoplatform.portal.webui.navigation.ParentChildPair;
import org.exoplatform.portal.webui.portal.UIPortal;
@@ -150,24 +151,36 @@
icon = "Default";
getChild(UIFormInputIconSelector.class).setSelectedIcon(icon);
getUIStringInput("label").setValue(pageNode_.getLabel());
- getUIFormCheckBoxInput(VISIBLE).setChecked(pageNode_.isVisible());
-
getUIFormCheckBoxInput(SHOW_PUBLICATION_DATE).setChecked(pageNode.isShowPublicationDate());
- setShowCheckPublicationDate(pageNode_.isVisible());
- Calendar cal = Calendar.getInstance();
- if (pageNode.getStartPublicationDate() != null)
+ if(pageNode.getVisibility() == Visibility.SYSTEM)
{
- cal.setTime(pageNode.getStartPublicationDate());
- getUIFormDateTimeInput(START_PUBLICATION_DATE).setCalendar(cal);
+ UIFormInputSet uiSettingSet = getChildById("PageNodeSetting");
+ uiSettingSet.removeChildById(VISIBLE);
+ uiSettingSet.removeChildById(SHOW_PUBLICATION_DATE);
+ uiSettingSet.removeChildById(START_PUBLICATION_DATE);
+ uiSettingSet.removeChildById(END_PUBLICATION_DATE);
}
else
- getUIFormDateTimeInput(START_PUBLICATION_DATE).setValue(null);
- if (pageNode.getEndPublicationDate() != null)
{
- cal.setTime(pageNode.getEndPublicationDate());
- getUIFormDateTimeInput(END_PUBLICATION_DATE).setCalendar(cal);
+ getUIFormCheckBoxInput(VISIBLE).setChecked(pageNode_.isVisible());
+
getUIFormCheckBoxInput(SHOW_PUBLICATION_DATE).setChecked(pageNode.isShowPublicationDate());
+ setShowCheckPublicationDate(pageNode_.isVisible());
+ Calendar cal = Calendar.getInstance();
+ if (pageNode.getStartPublicationDate() != null)
+ {
+ cal.setTime(pageNode.getStartPublicationDate());
+ getUIFormDateTimeInput(START_PUBLICATION_DATE).setCalendar(cal);
+ }
+ else
+ getUIFormDateTimeInput(START_PUBLICATION_DATE).setValue(null);
+ if (pageNode.getEndPublicationDate() != null)
+ {
+ cal.setTime(pageNode.getEndPublicationDate());
+ getUIFormDateTimeInput(END_PUBLICATION_DATE).setCalendar(cal);
+ }
+ else
+ getUIFormDateTimeInput(END_PUBLICATION_DATE).setValue(null);
}
- else
- getUIFormDateTimeInput(END_PUBLICATION_DATE).setValue(null);
+
}
public void invokeSetBindingBean(Object bean) throws Exception