I am having issues to display the validation message set using validatorMessage attribute for a component inside a4j:repeat.
Here is the code :
<a4j:repeat value="#{array}" var="value">
<h:inputText id="someId" validatorMessage="custom message" required="true" value="#{someValue}">
<h:message for="someId" />
</a4j:repeat>
Validation is working but printing some message with long id. I guess it is using the generated id.
ie
j_id333049330_13d9ed7d:j_id333049330_13d9ef4c:0:someId: Validation Error: Value is required.
It is not possible to put EL inside id attribute.
Thanks,
Ravi
That’s the label part of the validation message. This is normally to be set by
<h:inputText label>, but when it’s absent, then indeed by default the component’s client ID will be used.Just manually set the label: