Hi all,

 

I try to display the label of a field instead of the id in an error message, but I don't get it to work.

I'm sure there is an easy solution for it.

 

Here is my code:

 

Messages:

login.name = User

 

JSP:

<h:outputLabel for="">

   <h:outputText value="#{msgs['login.name']}"/>

</h:outputLabel>

<h:panelGroup>

            <h:inputText id="name" value="#{LoginControllerBean.name}" styleClass="inputField" required="true" />

            <h:message for="" styleClass="errorText"/>

</h:panelGroup>

                       

The following message is displayed if the name field is empty after submit:

'"name": Value is required.'

 

I want that '"User": Value is required.' is displayed.

 

Thanks for any help

Reply via email to