cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Leszek Gawron <lgaw...@mobilebox.pl>
Subject Re: SOLVED: CForms: quick question on server-side validation
Date Wed, 10 Aug 2005 07:44:47 GMT
footh wrote:
> I figured out the pure java way to accomplish this. 
> You can create a class that implements the
> WidgetValidator interface.  Then you do your
> validation logic in the "validate" method.
> 
> To add the validator to a widget in your javaflow, you
> use something like this:
> 				form.getChild("username").addValidator(new
> LoginValidator());

exactly

> 
> where LoginValidator is the class the implements
> WidgetValidator.
> 
> The only problem I seem to be having is the new
> ValidationError I create is not translating in i18n
> even though I have the translation value set to true.

does your form rendering pipepine has <map:transform type="i18n"/> ?
do you have a message catalogue defined?


-- 
Leszek Gawron                                      lgawron@mobilebox.pl
IT Manager                                         MobileBox sp. z o.o.
+48 (61) 855 06 67                              http://www.mobilebox.pl
mobile: +48 (501) 720 812                       fax: +48 (61) 853 29 65

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


Mime
View raw message