You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Adriaan Joubert <ad...@gmail.com> on 2008/04/16 18:06:54 UTC

ValidationMessages.properties

Hi,

I added a couple of validators to check for int/double values in text
fields. All works great, except that Tapestry cannot find my messages.
I've put messages in app.properties and also in
ValidationMessages.properties, but no matter where I put them they are
not being picked up. Anybody got any ideas?

Thanks,

Adriaan

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: ValidationMessages.properties

Posted by Adriaan Joubert <ad...@gmail.com>.
Excellent, thanks a lot, Peter. Looked in the tapestry init for the
registration of the validation functions, but not for the message
catalogs.

I've added a page to the wiki with a description of adding validators.
For anybody else with the same problems look at

http://wiki.apache.org/tapestry/Tapestry5HowToAddValidators

Any suggestions/corrections welcome.

Cheers,

Adriaan

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: ValidationMessages.properties

Posted by Peter Beshai <pe...@gmail.com>.
In your AppModule:

If your properties file is at :
org.myorg.myapp.ValidationMessages.properties, add:

public void contributeValidationMessagesSource(Configuration<String>
configuration)
{
        configuration.add("org/myorg/myapp/ValidationMessages");
}

It's very useful to check how Tapestry sets itself up if you ever have
questions like these. I recommend checking TapestryModule for an answer
before the mailing list :-)
http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/services/TapestryModule.java?view=markup


Peter Beshai

On Wed, Apr 16, 2008 at 12:06 PM, Adriaan Joubert <ad...@gmail.com>
wrote:

> Hi,
>
> I added a couple of validators to check for int/double values in text
> fields. All works great, except that Tapestry cannot find my messages.
> I've put messages in app.properties and also in
> ValidationMessages.properties, but no matter where I put them they are
> not being picked up. Anybody got any ideas?
>
> Thanks,
>
> Adriaan
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>