Hi Julien,

may I ask where the problem was and how you solved it?

- Tobias

Julien schrieb:
Hi,

Thanks for your reply, and sorry for my bad english (i'm french) ;)

Using the app.properties file isn't really a good solution for me, since I replaced the default MessagesSource to used a database instead of propertie file.
By the way, it helped me to find where was my mistake :)

Thanks a lot Filip


Filip S. Adamsen a écrit :
Hi,

You can stick the message in app.properties and it will be used whenever a message isn't found in the component's messages.

-Filip

Julien skrev:
Hi,

I've created a custom validator, and i'd like to customize the message key, to create generic validation messages. For example, if I use my "email" validator, tapestry will look for "<fieldId>-email-message" key, so I have to copy my message text in every page... arrg

The Javadoc of AbstractValidator ( http://tapestry.formos.com/nightly/tapestry5/apidocs/org/apache/tapestry5/validator/AbstractValidator.html ) say that we can set the message key in the constructor, like this:

public EmailValidator() {
       super(null, String.class, "mykey");
}

Well, did it, Tapestry still looking for "<fieldId>-email-message"...

What did I missed ?

One more thing; I use my own MessageSource ( http://www.nabble.com/T5-%3A-Expanding-Messages-Catalog-for-localization-from-arbitrary-source-td16608683.html#a16611882 )

Thx

 Julien





---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

  • Re: [T5] Change validation message key Tobias Wehrum

Reply via email to