[gatein-commits] gatein SVN: r5103 - exo/portal/branches/3.1.x/webui/portal/src/main/java/org/exoplatform/portal/webui/page.
do-not-reply at jboss.org
do-not-reply at jboss.org
Tue Nov 16 05:27:50 EST 2010
Author: ndkhoiits
Date: 2010-11-16 05:27:49 -0500 (Tue, 16 Nov 2010)
New Revision: 5103
Modified:
exo/portal/branches/3.1.x/webui/portal/src/main/java/org/exoplatform/portal/webui/page/UIPageNodeForm.java
Log:
EXOGTN-103 Allow modifies label of the system node
Modified: exo/portal/branches/3.1.x/webui/portal/src/main/java/org/exoplatform/portal/webui/page/UIPageNodeForm.java
===================================================================
--- exo/portal/branches/3.1.x/webui/portal/src/main/java/org/exoplatform/portal/webui/page/UIPageNodeForm.java 2010-11-16 10:09:34 UTC (rev 5102)
+++ exo/portal/branches/3.1.x/webui/portal/src/main/java/org/exoplatform/portal/webui/page/UIPageNodeForm.java 2010-11-16 10:27:49 UTC (rev 5103)
@@ -186,13 +186,16 @@
public void invokeSetBindingBean(Object bean) throws Exception
{
super.invokeSetBindingBean(bean);
- PageNode node = (PageNode)bean;
- Calendar cal = getUIFormDateTimeInput(START_PUBLICATION_DATE).getCalendar();
- Date date = (cal != null) ? cal.getTime() : null;
- node.setStartPublicationDate(date);
- cal = getUIFormDateTimeInput(END_PUBLICATION_DATE).getCalendar();
- date = (cal != null) ? cal.getTime() : null;
- node.setEndPublicationDate(date);
+ PageNode node = (PageNode) bean;
+ if (node.getVisibility() != Visibility.SYSTEM)
+ {
+ Calendar cal = getUIFormDateTimeInput(START_PUBLICATION_DATE).getCalendar();
+ Date date = (cal != null) ? cal.getTime() : null;
+ node.setStartPublicationDate(date);
+ cal = getUIFormDateTimeInput(END_PUBLICATION_DATE).getCalendar();
+ date = (cal != null) ? cal.getTime() : null;
+ node.setEndPublicationDate(date);
+ }
}
public void setShowCheckPublicationDate(boolean show)
@@ -269,7 +272,11 @@
WebuiRequestContext ctx = event.getRequestContext();
UIPageNodeForm uiPageNodeForm = event.getSource();
UIApplication uiPortalApp = ctx.getUIApplication();
- if (uiPageNodeForm.getUIFormCheckBoxInput(SHOW_PUBLICATION_DATE).isChecked())
+ PageNode pageNode = uiPageNodeForm.getPageNode();
+ if (pageNode == null)
+ pageNode = new PageNode();
+
+ if (pageNode.getVisibility() != Visibility.SYSTEM && uiPageNodeForm.getUIFormCheckBoxInput(SHOW_PUBLICATION_DATE).isChecked())
{
Calendar currentCalendar = Calendar.getInstance();
currentCalendar.set(currentCalendar.get(Calendar.YEAR), currentCalendar.get(Calendar.MONTH), currentCalendar.get(Calendar.DAY_OF_MONTH), 0, 0, 0);
@@ -305,10 +312,7 @@
}
}
-
- PageNode pageNode = uiPageNodeForm.getPageNode();
- if (pageNode == null)
- pageNode = new PageNode();
+
uiPageNodeForm.invokeSetBindingBean(pageNode);
UIPageSelector2 pageSelector = uiPageNodeForm.getChild(UIPageSelector2.class);
if (pageSelector.getPage() == null)
More information about the gatein-commits
mailing list