On Tue, 2003-11-11 at 12:47, 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>
> 
> which means that any custom validation errors pretty much have to be 
> kept in WoodyMessages which could well be inconvenient ....
> 
> Is it really necessary for Woody to set the catalogue attribute in this 
> situation?

Yes and no. The reason is historical: ValidationErrors were only created
by Woody classes themselves, so all their messages would come from the
woody catalogue.

Now that setValidationError is a public method, it is indeed necessary
to add some more flexibility to the ValidationError class.

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

As Sylvain also replied, this has been brought up already, even as
recently as a couple of days ago on the user mailing list:

http://marc.theaimsgroup.com/?l=xml-cocoon-users&m=106821138010096&w=2

I suppose you should know since you even replied to it ;-)

I've actually implemented it already but I want to clean up some other
things first before committing it.

-- 
Bruno Dumon                             http://outerthought.org/
Outerthought - Open Source, Java & XML Competence Support Center
[EMAIL PROTECTED]                          [EMAIL PROTECTED]

Reply via email to