f you care to see the HTML source from your browser, you will find out that the id
of your input
field is <form-id>+":"+<input-field-id>
, in your case, j_idt7:UserId:
. Try to give your<h:form>
some meaningful id
in order to make some sense out of it. You can read about JSF IDs here. In case you don't like it, you can turn it off by modifying your form
tag to something like this,
<h:form prependId = false> // its true by default.
But that might turn out to be problematic, as pointed out by BalusC here.
Furthermore, it seems like you have never configured any validation messages yourself. Which in turn ends up with this message. Hence, a message.properties
file is needed to have a control over message and show something more appropriate. Even then the field name should not be the part of the message, to make those validation message generic to avoid repetition. See BalusC's answer regarding the use of label
attribute inside the <h:inputText>
.