cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bart Molenkamp" <b.molenk...@bizzdesign.nl>
Subject RE: Setting validation errors on repeaters?
Date Mon, 08 Nov 2004 08:42:02 GMT
Sounds as a reasonable solution for this problem.
Thanks (again).

> -----Original Message-----
> From: Sylvain Wallez [mailto:sylvain@apache.org]
> Sent: Friday, November 05, 2004 10:05 PM
> To: dev@cocoon.apache.org
> Subject: Re: Setting validation errors on repeaters?
> 
> Bart Molenkamp wrote:
> 
> >Hi all,
> >
> >Why are repeaters not ValidationErrorAware? I have the requirement
that
> >my repeater contains at least 1 row. I can check that with a
JavaScript
> >validator, but where can I set the error? Should Repeater implement
> >ValidationErrorAware for this kind of use cases?
> >
> >
> 
> A repeater cannot hold a validation error, because errors on a
repeater
> are most likely to be caused by its content (or lack thereof).
> 
> I had the same requirement as yours, and implemented it in a different
> way: if the user removes the last remaining row in a repeater, an
empty
> row is recreated immediately (it's in the delete action's event
> listener). Since the row contains required fields, the form cannot
> sucessfully validate unless at least one row is correctly filled.
> 
> Hope this helps,
> Sylvain
> 
> --
> Sylvain Wallez                                  Anyware Technologies
> http://www.apache.org/~sylvain           http://www.anyware-tech.com
> { XML, Java, Cocoon, OpenSource }*{ Training, Consulting, Projects }


Mime
View raw message