Hi,
I have an inputText with a validator method, all works (also with the 3.2.2) but if I put inside the inputText a beanValidator (to validate the annotations I putted in the bean) it stop working.
Here there is the XHTML:
<h:outputLabel value="E-mail" for="emailNL" style="font-weight: bold;"></h:outputLabel>
<h:inputText label="Email" id="emailNL" value="#{newsletterHelper.newsletter.email}" validator="#{newsletterHelper.validaEmailNewsletter}" required="true">
<rich:beanValidator />
</h:inputText>
<h:message id="error" for="emailNL" errorClass="errorMessage"></h:message>
public void validaEmailNewsletter(FacesContext context, UIComponent toValidate, Object value) throws ValidatorException {
if (isEmailInserita((String)value)) { // se c'è giÃÂÂ
FacesMessage message = new FacesMessage(FacesMessage.SEVERITY_ERROR, "Attenzione: l'indirizzo email è giàstato registrato", "Attenzione: l'indirizzo email è giàstato registrato");
throw new ValidatorException(message);
}
}
Hi,
That can be because h:message shows the first message only. Try to use h:messages or rich:messages instead.