You can use the MessageUtils Class and its method addmessage
http://myfaces.apache.org/javadoc/impl/org/apache/myfaces/util/MessageUtils.html

addMessage(javax.faces.application.FacesMessage.Severity severity, 
java.lang.String messageId, java.lang.Object[] args, java.lang.String 
forClientId, javax.faces.context.FacesContext facesContext) 

There you can add a Object[] which could contain your field.

In the message in the properties file you simple say:

messageId=Error in field {0}

where{0} comes from the Object[]

Regards
Andy

-----Ursprüngliche Nachricht-----
Von: Luca Conte [mailto:[EMAIL PROTECTED]
Gesendet: Freitag, 25. November 2005 13:22
An: MyFaces Discussion
Betreff: Errors messages params


Hi guys,
does exists a way to control the error message params? I found the way
to use my own error/validation messages but what about if I would like
to put (for example) my own "{0}" value?

Thx a lot

 
 
 --
 Email.it, the professional e-mail, gratis per te: http://www.email.it/f
 
 Sponsor:
 Scarica la Rana Pazza sul tuo cellulare - come vista in televisione!
* La prima suoneria è GRATIS!
 Clicca qui: http://adv.email.it/cgi-bin/foclick.cgi?mid=3539&d=25-11


______________________________________________________________________

This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
your system manager.

This footnote also confirms that this email message has been swept
for the presence of computer viruses.
______________________________________________________________________

Reply via email to