cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Eric Gulatee <>
Subject Re: Woody Related Questions
Date Wed, 23 Jul 2003 12:54:28 GMT
On Sat, 2003-07-19 at 23:41, Eric Gulatee wrote:
>>     Now basically my problem is that I want to be
>> to hook into my own validation routines on top of
>> Woody's.  [If you're registering a user, you need
>> verify the name is available]...  Now I've noticed
>> that if you hook into your own form handler
>> doesn't occur.  

>that's on purpose

Well, I extended the Form Handler and
WoodySubmitAction [something like that] to be able to
do just that.  

My scenario being a typical registration, you need to
validate that the username has not been taken, however
you still want to do the normal validation on the
So I extended a few classes in order to do this.  

But I was hoping that I could use the widgets to
create a ValidationError but this is all hidden as you
say yet once you do this custom validation you need to
be able to select a widget and add a custom error

>> How about adding a few methods to the FormHandler
>> interface in order that the form can query it
>> or not the handler can do extra validation.  (I
>> do this for my own project unless someone wakes me
>> and informs me there is a better way :))

>It's been the intention all along to add something
>like that, it just
>hasn't been done yet. I haven't put much thought to
it yet.

>What I think would be needed is:

>* an extra validate() method on the FormHandler
(which will then likely
>be split into two interfaces: FormEventHandler and
>FormValidationHandler) which will be called after the
>default validation

I've done this by extending FormHandler and

>* A way to set the validation error of a widget, i.e.
>add a
>setValidationError method to the Widget interface.
>Currently the fact
>that widgets can have validation errors is an
>implementation detail of
>the widget itself.

>Another possiblity would be to make these
form->specific validations
>behave like other validation rules. I.e. you declare
>them in the
>formdefinition, but their implementation would then
>call a method on
>your custom FormValidationHandler.

Yeah, I looked into trying to define a custom
validation rule that hooks into your own code for
validation.  But I haven't done this yet.

>>     Secondly what happens if you have two woody
>> on the same page?  When I started I had a login
>> on my left menu and the user could also register in
>> the center pane and when submitting both forms
>> try to validate...

>I don't understand your question. Are you describing
>a problem or is
>this something you'd like to do?

This is a program I encountered,  say I have a login
form on the leftmenu and the users select registration
from the menu which displays in the center pane
[keeping the left menu there with the login form] well
once the user click on Register then both forms are


Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message