01-30-2012 10:45 AM
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 10:59 AM
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 10:59 AM
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 03:47 AM
Thanks, it worked.
01-31-2012 04:05 AM
Using a standard h
02-06-2012 01: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.