Jeremy Quinn wrote:

Dear All

I noticed that when you use something like :

    form.getWidget ("email").setValidationError (
        new ValidationError ("validation.email.inuse")
    );

then the i18n tag output by setValidationError() looks like this:

<i18n:text catalogue="woody">validation.email.inuse</i18n:text>


Note that you can also use the second constructor which specifies if the string is an i18n key or the final message, i.e.:
new ValidationError("Bad input!", false);


which means that any custom validation errors pretty much have to be kept in WoodyMessages which could well be inconvenient ....


Sure, you're right.

Is it really necessary for Woody to set the catalogue attribute in this situation?


I would say no, but I'm not very aware of the multicatalogue i18n features. Isn't it possible to specify no attribute and have the i18n transformer search all declared catalogues?

BTW. Is there a plan to add a generic form validation message tag to woody? ie. not tied to a particular field widget.


A widget that would collect all error messages? IIRC, this has been discussed.

Sylvain

--
Sylvain Wallez                                  Anyware Technologies
http://www.apache.org/~sylvain           http://www.anyware-tech.com
{ XML, Java, Cocoon, OpenSource }*{ Training, Consulting, Projects }
Orixo, the opensource XML business alliance  -  http://www.orixo.com




Reply via email to