Hello Everybody
I had downloaded the booking-faces example with primefaces. And I wanted to use the error message on the "enterBookingDetails.xhtml", when you not fill out the credit card name, in my web-application.
First I added the @NotEmpty tag to my model class.
Then I created my xhtml for that.Code:@NotEmpty private String username; @NotEmpty protected String firstName; @NotEmpty protected String lastName;
When I press the save button with empty fields, the error message comes up but only show:Code:<ui:define name="content"> <h:form id="studentForm"> <p:messages /> <p:fieldset legend="Student #{student.username}"> <h:outputLabel for="userName">#{text['user.username']}</h:outputLabel> <h:inputText id="userName" label="User name" value="#{student.username}" /> <h:outputLabel for="firstName">#{text['user.firstName']}</h:outputLabel> <h:inputText id="firstName" label="First name" value="#{student.firstName}" /> <h:outputLabel for="lastName">#{text['user.lastName']}</h:outputLabel> <h:inputText id="lastName" label="Last name" value="#{student.lastName}" /> <p:commandButton id="save" value="#{text['button.save']}" action="save" update="@form" /> <p:commandButton id="cancel" value="#{text['button.cancel']}" action="cancel" immediate="true" /> </p:fieldset> </h:form> </ui:define>The Label is missing.Code:may not be empty may not be empty may not be empty
So can anybody tells me what I do wrong, that the labels does not shown in the message.
Thanks
EDIT:
I use
spring version: 3.0.5.RELEASE
webflow version: 2.2.1.RELEASE
hibernate version: 3.3.2.GA
primefaces version: 3.0.M1


Reply With Quote