You can find the full source code for this website in the Seam package in the directory /examples/wiki. It is licensed under the LGPL.
| Online: | 13 Members of 4063 |
| Forum: Seam Users |
08. Apr 2008, 14:33 CET | Link |
Hi everyone.
I've a question about validation and showing validation messages in Seam 2.0.1 GA and JBoss 4.2.2 GA.
I want to display a custom validation message if a required field is not set. But not by defining a custom text in messages.properties for all missing required values:
javax.faces.component.UIInput.REQUIRED=custom message for all required fields
because I want to set explicit messages for each missing property (with hibernate valdation ?). Like:
@NotNull(message="CardId is required!")
public String getCardId()
{
return cardId;
}
Unfortunately I get the custom defined message if there is no value entered on the screen for the specific property.
<h:inputText id="cardId" value="#{acquisition.cardId}" required="true"/>
Does anyone know how i can see the specific message ?
Regards
Lars
Hi
Do you use
or
?I tried both, with same result (jsf message for required fields).
Lars
Lars,
JSF will not call out validators if no value is entered in the field. So hibernate validator is not called.