You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Angelo Chen <an...@yahoo.com.hk> on 2008/03/22 04:08:45 UTC

t5: extending Tapestry.js and ValidationMessages.properites

Hi,

I coded a validator, it's working, i got two issues:

1) extending ValidationMessages.properties: of course I can just add my
message to the file, but that's not a good idea, is there way to add the
message in the application level?

2) Tapestry.js' addValidator,  adding my js validator to the file works, but
I'd like to put my validators in my own js file, then call the Tapestry.js'
addValidator, any idea how to do this?

Thanks,

A.C.
-- 
View this message in context: http://www.nabble.com/t5%3A-extending-Tapestry.js-and-ValidationMessages.properites-tp16214696p16214696.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


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


Re: t5: extending Tapestry.js and ValidationMessages.properites

Posted by Chris Lewis <ch...@bellsouth.net>.
1) This has been talked about on the wiki I think, and I believe you can
add your own properties file with the same name and package, within your
own application structure. I believe that doing so will append your
messages to the core file (or override ones you override).

2) Sure, just add your own file with your validator objects declared,
and at the end of that file call Tapestry.addValidator(). You just have
to make sure that any pages/components that use your validators include
tapestry.js BEFORE your own validators js file.

Angelo Chen wrote:
> Hi,
>
> I coded a validator, it's working, i got two issues:
>
> 1) extending ValidationMessages.properties: of course I can just add my
> message to the file, but that's not a good idea, is there way to add the
> message in the application level?
>
> 2) Tapestry.js' addValidator,  adding my js validator to the file works, but
> I'd like to put my validators in my own js file, then call the Tapestry.js'
> addValidator, any idea how to do this?
>
> Thanks,
>
> A.C.
>   

-- 
http://thegodcode.net


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