myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bruno Aranda <brunoara...@gmail.com>
Subject Re: display label in error message instead of id
Date Thu, 16 Feb 2006 16:46:54 GMT
Sure, there is an easy solution. Use the extended messages component
from tomahawk (t:message).

Regards,

Bruno

On 2/16/06, Michael Heinen <mhn@recommind.com> wrote:
>
>
>
> 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="name">
>
>    <h:outputText value="#{msgs['login.name']}"/>
>
> </h:outputLabel>
>
> <h:panelGroup>
>
>             <h:inputText id="name" value="#{LoginControllerBean.name}"
> styleClass="inputField" required="true" />
>
>             <h:message for="name" 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

Mime
View raw message