You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by rahmoune patrick <js...@yahoo.fr> on 2005/10/10 17:38:33 UTC
Custom validation message
Hi,
I would like to display a custom validation error message
when using the EqualValidator.
The message could be different depending on the context
I think about creating my own that takes a messageKey as a tag attribute.
Is this the way to go ?
Patrick
---------------------------------
Appel audio GRATUIT partout dans le monde avec le nouveau Yahoo! Messenger
Téléchargez le ici !
Re: Custom validation message
Posted by rahmoune patrick <js...@yahoo.fr>.
Hi, thank you for the reply
Since I want to be able to use args in the message, I think that the replacement
should be done before the faces message is created. So, I don't get the custom renderer idea
For the moment, I've created my own EqualValidator with a message key and it is ok.
I don't like the solution but it was easy to implement
comment?
Andrew robinson <an...@gmail.com> a écrit :
There are probably several ways to skin this cat. Here are a few:
you could use f:attribute then create a custom renderer to replace the message
use a properties file and override the default EqualValidator message (this would be for all instances).
use a custom renderer, and replace the message based on properties of the component
-Andrew
On 10/10/05, rahmoune patrick <js...@yahoo.fr> wrote:Hi,
I would like to display a custom validation error message
when using the EqualValidator.
The message could be different depending on the context
I think about creating my own that takes a messageKey as a tag attribute.
Is this the way to go ?
Patrick
---------------------------------
Appel audio GRATUIT partout dans le monde avec le nouveau Yahoo! Messenger
Téléchargez le ici !
---------------------------------
Appel audio GRATUIT partout dans le monde avec le nouveau Yahoo! Messenger
Téléchargez le ici !
Re: Custom validation message
Posted by Andrew robinson <an...@gmail.com>.
There are probably several ways to skin this cat. Here are a few:
1. you could use f:attribute then create a custom renderer to replace
the message
2. use a properties file and override the default EqualValidator
message (this would be for all instances).
3. use a custom renderer, and replace the message based on properties
of the component
-Andrew
On 10/10/05, rahmoune patrick <js...@yahoo.fr> wrote:
>
> Hi,
> I would like to display a custom validation error message
> when using the EqualValidator.
> The message could be different depending on the context
> I think about creating my own that takes a messageKey as a tag attribute.
> Is this the way to go ?
> Patrick
>
> ------------------------------
> *Appel audio GRATUIT partout dans le monde* avec le nouveau Yahoo!
> Messenger
> Téléchargez le ici !<http://us.rd.yahoo.com/messenger/mail_taglines/default/*http://fr.messenger.yahoo.com>
>
>