Author: chris.laprun(a)jboss.com
Date: 2012-03-16 08:26:50 -0400 (Fri, 16 Mar 2012)
New Revision: 8614
Modified:
epp/portal/branches/EPP_5_2_Branch/webui/portal/src/main/java/org/exoplatform/portal/webui/application/UIPortletForm.java
Log:
Bug 803896
- Removed improper NullFieldValidator on description field.
- Cleaned-up formatting as it was getting unwieldy to see what was going on
- Replaced (and tested) use of deprecated UIFormCheckBoxInput by UICheckBoxInput.
Modified:
epp/portal/branches/EPP_5_2_Branch/webui/portal/src/main/java/org/exoplatform/portal/webui/application/UIPortletForm.java
===================================================================
---
epp/portal/branches/EPP_5_2_Branch/webui/portal/src/main/java/org/exoplatform/portal/webui/application/UIPortletForm.java 2012-03-16
04:28:51 UTC (rev 8613)
+++
epp/portal/branches/EPP_5_2_Branch/webui/portal/src/main/java/org/exoplatform/portal/webui/application/UIPortletForm.java 2012-03-16
12:26:50 UTC (rev 8614)
@@ -46,6 +46,7 @@
import org.exoplatform.webui.event.Event.Phase;
import org.exoplatform.webui.event.EventListener;
import org.exoplatform.webui.form.*;
+import org.exoplatform.webui.form.input.UICheckBoxInput;
import org.exoplatform.webui.form.validator.NotHTMLTagValidator;
import org.exoplatform.webui.form.validator.ExpressionValidator;
import org.exoplatform.webui.form.validator.MandatoryValidator;
@@ -94,23 +95,20 @@
UIFormInputSet uiPortletPrefSet = new
UIFormInputSet(FIELD_PORTLET_PREF).setRendered(false);
addUIFormInput(uiPortletPrefSet);
UIFormInputSet uiSettingSet = new UIFormInputSet("PortletSetting");
- uiSettingSet.
- /*addUIFormInput(new UIFormStringInput("id", "id", null).
- addValidator(MandatoryValidator.class).setEditable(false)).
- addUIFormInput(new UIFormStringInput("windowId", "windowId",
null).setEditable(false)).*/
- addUIFormInput(new UIFormInputInfo("displayName",
"displayName", null)).addUIFormInput(
- new UIFormStringInput("title", "title",
null).addValidator(StringLengthValidator.class, 3,
60).addValidator(NotHTMLTagValidator.class,
- "UIPortletForm.msg.InvalidPortletTitle"))
- .addUIFormInput(
- new UIFormStringInput("width", "width",
null).addValidator(ExpressionValidator.class, "(^([1-9]\\d*)px$)?",
- "UIPortletForm.msg.InvalidWidthHeight")).addUIFormInput(
- new UIFormStringInput("height", "height",
null).addValidator(ExpressionValidator.class,
- "(^([1-9]\\d*)px$)?",
"UIPortletForm.msg.InvalidWidthHeight")).addUIFormInput(
- new UIFormCheckBoxInput("showInfoBar", "showInfoBar",
false)).addUIFormInput(
- new UIFormCheckBoxInput("showPortletMode",
"showPortletMode", false)).addUIFormInput(
- new UIFormCheckBoxInput("showWindowState",
"showWindowState", false)).addUIFormInput(
- new UIFormTextAreaInput("description",
"description", null).addValidator(
- NullFieldValidator.class).addValidator(NotHTMLTagValidator.class,
"UIPortletForm.msg.InvalidPortletDescription"));
+ uiSettingSet
+ .addUIFormInput(new UIFormInputInfo("displayName",
"displayName", null))
+ .addUIFormInput(new UIFormStringInput("title", "title",
null)
+ .addValidator(StringLengthValidator.class, 3, 60)
+ .addValidator(NotHTMLTagValidator.class,
"UIPortletForm.msg.InvalidPortletTitle"))
+ .addUIFormInput(new UIFormStringInput("width", "width",
null)
+ .addValidator(ExpressionValidator.class, "(^([1-9]\\d*)px$)?",
"UIPortletForm.msg.InvalidWidthHeight"))
+ .addUIFormInput(new UIFormStringInput("height", "height",
null)
+ .addValidator(ExpressionValidator.class, "(^([1-9]\\d*)px$)?",
"UIPortletForm.msg.InvalidWidthHeight"))
+ .addUIFormInput(new UICheckBoxInput("showInfoBar",
"showInfoBar", false))
+ .addUIFormInput(new UICheckBoxInput("showPortletMode",
"showPortletMode", false))
+ .addUIFormInput(new UICheckBoxInput("showWindowState",
"showWindowState", false))
+ .addUIFormInput(new UIFormTextAreaInput("description",
"description", null)
+ .addValidator(NotHTMLTagValidator.class,
"UIPortletForm.msg.InvalidPortletDescription"));
addUIFormInput(uiSettingSet);
UIFormInputIconSelector uiIconSelector = new
UIFormInputIconSelector("Icon", "icon");
addUIFormInput(uiIconSelector);