Author: ppalaga
Date: 2012-06-27 08:55:08 -0400 (Wed, 27 Jun 2012)
New Revision: 8751
Modified:
epp/portal/branches/EPP_5_2_Branch/webui/
epp/portal/branches/EPP_5_2_Branch/webui/portal/src/main/java/org/exoplatform/portal/webui/application/UIPortletForm.java
Log:
Bug 793856 - (JBEPP-930) Error message about portlet dimensions (width, height) not clear
enough
Property changes on: epp/portal/branches/EPP_5_2_Branch/webui
___________________________________________________________________
Modified: svn:ignore
- *.iml
.idea
.project
+ *.iml
.idea
.project
.settings
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-06-27
07:11:15 UTC (rev 8750)
+++
epp/portal/branches/EPP_5_2_Branch/webui/portal/src/main/java/org/exoplatform/portal/webui/application/UIPortletForm.java 2012-06-27
12:55:08 UTC (rev 8751)
@@ -101,9 +101,9 @@
.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"))
+ .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"))
+ .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))
@@ -383,6 +383,10 @@
}
else
{
+ if (!width.endsWith("px"))
+ {
+ width = width.concat("px");
+ }
uiPortlet.setWidth(width);
}
@@ -393,6 +397,10 @@
}
else
{
+ if (!height.endsWith("px"))
+ {
+ height = height.concat("px");
+ }
uiPortlet.setHeight(height);
}