I was afraid of having to do this.
Actually I don't want to override the messages because I want to show
them in a summary list at the top of my page. 

I just want to mark the incorrect fields in addition.
Is there no other possibility or workaround? 

-----Original Message-----
From: Sean Schofield [mailto:[EMAIL PROTECTED] 
Sent: Dienstag, 21. Februar 2006 19:19
To: MyFaces Discussion
Subject: Re: simple identification of incorrect fields

The required message doesn't work this way.  You need to override the
value in Message.properties if you want to use just an asterisk
character.

The defaults are ...

javax.faces.component.UIInput.REQUIRED        = Validation Error
javax.faces.component.UIInput.REQUIRED_detail = "{0}": Value is
required.

If you check the spec docs you can see the various ways to overload
these and replace them with your own.

Sean



On 2/21/06, Michael Heinen <[EMAIL PROTECTED]> wrote:
>
>
>
> Hi all,
>
>
>
> I display at the top of my page a summary of all error messages.
>
>
>
> In addition I try to mark all incorrect fields with a '*' or another
symbol.
>
> Currently I have no idea how to implement this in an easy way.
>
>
>
> The following simple approach is not working:
>
> <h:inputText id="searchName" value="#{ControllerBean.searchName}"
> required="true"/>
>
> <t:message for="searchName" showDetail="false"
> showSummary="false">*</t:message>
>
>
>
> If I enclose the '*' with a verbatim tag it will be always displayed
(even
> without errors).
>
>
>
> I'am sure this is a common requirement therefore this question.
>
>
>
> Michael
>
>

Reply via email to