I'm having some trouble getting validation messages to show up.
For instance, if I have the following:
<h:inputText id="attribute" value="#{bean.attribute}"
validator="#{bean.validateAttribute}" required="true"/>
<h:message for="attribute"/>
and
public class Bean {
...
public void validateAttribute(FacesContext context, UIComponent
component, Object object) throws ValidatorException {
throw new ValidatorException(new
FacesMessage(FacesMessage.SEVERITY_ERROR, "summary", "detail"));
}
...
}
If I leave the field blank, I see a validation error message from the
required attribute, as expected. However, If I put something in there
and it falls through to the bean.validateAttribute method, then the
validation is done and the value is not applied. However, there is no
trace of the message.
I am using Sandbox subForms. I don't know what else might interfere
with the messages.
--
Gary