You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Christoph Jäger <ch...@derwald.at> on 2008/11/26 22:02:28 UTC

T5: client side validator / how to include javascript

Hi,

As described in my previous mail, I created a Translator to convert  
between a string representation of latitude / longitude values in a  
format like "12° 34" 56.7' N" for display in my text fields and a  
Double, which is used in my model. Since I upgraded to T 5.0.16, I get  
these nasty red boxes "Function Tapestry.Validator.latitude() does not  
exist for field 'latitude'" on pages using this translator. I learned  
that this is due to my form using client side validation, but no  
client side validator function is defined for my translator.

Ok, so lets add this client side validation code. I found a nice howto

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

but it contains the following sentence:

 > This javascript file needs to be included in all pages/components  
where the new validator is to be used (Is there a better way?)

How do I make Tapestry automatically include my javascript file in  
case my translator is used in a page? Is there some kind of registry  
for things like this?

Thanks,

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