[JBoss JIRA] Created: (GTNPORTAL-1673) make UI validation regular expressions configurable by users
by Gary Hu (JIRA)
make UI validation regular expressions configurable by users
-------------------------------------------------------------
Key: GTNPORTAL-1673
URL: https://jira.jboss.org/browse/GTNPORTAL-1673
Project: GateIn Portal
Issue Type: Feature Request
Security Level: Public (Everyone can see)
Reporter: Gary Hu
The current exoadmin portlet uses hard coded regular expressions to validate the UI component form in multiple java files under portlet/exoadmin/src/main/java/org/exoplatform/organization/webui/component.
For example, the org.exoplatform.organization.webui.component.UIGroupMembershipForm class has the following lines:
addUIFormInput(new UIFormStringInput(USER_NAME, USER_NAME, null).addValidator(MandatoryValidator.class)
.addValidator(ExpressionValidator.class, "^\\p{L}[\\p{L}\\d._\\-,]+$", "UIGroupMembershipForm.msg.Invalid-char"));
Can we make the validation expressions configurable by users? We can still keep the current validation expressions as the default but allow the user defined expressions to override the default.
--
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 8 months
[JBoss JIRA] Created: (GTNPORTAL-1730) samples portlet.xml : cannot validate against portlet-app_2_0.xsd - element init-param at wrong place.
by Antoine Herzog (JIRA)
samples portlet.xml : cannot validate against portlet-app_2_0.xsd - element init-param at wrong place.
------------------------------------------------------------------------------------------------------
Key: GTNPORTAL-1730
URL: https://issues.jboss.org/browse/GTNPORTAL-1730
Project: GateIn Portal
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: Documentation, QA
Affects Versions: 3.1.0-GA
Reporter: Antoine Herzog
Assignee: Luc Texier
Priority: Trivial
In many of the samples, such as jsfhellouser, the portlet.xml, that have the <init-param> element, cannot validate against the schema : http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd.
In eclipse, you can see it directly with a validation error.
The error message is :
cvc-complex-type.2.4.a: Invalid content was found starting with element 'init-param'. One of '{"http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd":portlet-preferences, "http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd":security-role-ref, "http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd":supported-processing-event, "http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd":supported-publishing-event, "http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd":supported-public-render-parameter, "http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd":container-runtime-option}' is expected.
The turnaround is simple : move the <init-param> element(s) after the <portlet-class> element, and before the <supports> element.
Simple, but it would be more clean if the file directly with that.
--
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 10 months