01-30-2012 01:45 PM
How can I make a field mandatory in a widget template? On the creation layout I have a widget template mapped to a schema field. In custom properties configuration I have added the property "required" with value "true". At runtime, it shows the required star "*" in the creation form, but it doesn't validate that the value is not empty. How can I validate it?
01-30-2012 01:59 PM
Hi,
Just add required="#{widget.required}" to the JSF tag bound to the #{field} mapping.
Here's an example:
<h:selectOneMenu value="#{field}" id="#{widget.id}"
required="#{widget.required}">
<f:selectItem itemValue="deleted" itemLabel="#{messages['label.no']}" />
<f:selectItem itemValue=" " itemLabel="#{messages['label.yes']}" />
</h:selectOneMenu>
<h:message styleClass="errorMessage" for="#{widget.id}"
id="#{widget.id}_message" />
01-30-2012 01:59 PM
Hi,
Just add required="#{widget.required}" to the JSF tag bound to the #{field} mapping.
Here's an example:
<h:selectOneMenu value="#{field}" id="#{widget.id}"
required="#{widget.required}">
<f:selectItem itemValue="deleted" itemLabel="#{messages['label.no']}" />
<f:selectItem itemValue=" " itemLabel="#{messages['label.yes']}" />
</h:selectOneMenu>
<h:message styleClass="errorMessage" for="#{widget.id}"
id="#{widget.id}_message" />
01-31-2012 06:47 AM
Thanks, it worked.
01-31-2012 07:05 AM
Using a standard h
02-06-2012 04:19 AM
Thanks it worked.
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.