You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Eric Gulatee <er...@yahoo.com> on 2003/07/19 23:41:49 UTC

Woody Related Questions

Hi all,

    I've been tinkering around with Woody lately and
really love the feature set [Automatic valication and
hooks for cumstom handlers etc etc].

    Now basically my problem is that I want to be able
to hook into my own validation routines on top of
Woody's.  [If you're registering a user, you need to
verify the name is available]...  Now I've noticed
that if you hook into your own form handler validation
doesn't occur.  

How about adding a few methods to the FormHandler
interface in order that the form can query it whether
or not the handler can do extra validation.  (I will
do this for my own project unless someone wakes me up
and informs me there is a better way :))
    
    Secondly what happens if you have two woody forms
on the same page?  When I started I had a login form
on my left menu and the user could also register in
the center pane and when submitting both forms would
try to validate...

Cheers,  
Keep up the amazing work
Eric.
    


__________________________________
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com

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


Re: Woody Related Questions

Posted by Bruno Dumon <br...@outerthought.org>.
On Sat, 2003-07-19 at 23:41, Eric Gulatee wrote:
> Hi all,
> 
>     I've been tinkering around with Woody lately and
> really love the feature set [Automatic valication and
> hooks for cumstom handlers etc etc].
> 
>     Now basically my problem is that I want to be able
> to hook into my own validation routines on top of
> Woody's.  [If you're registering a user, you need to
> verify the name is available]...  Now I've noticed
> that if you hook into your own form handler validation
> doesn't occur.  

that's on purpose

> 
> How about adding a few methods to the FormHandler
> interface in order that the form can query it whether
> or not the handler can do extra validation.  (I will
> do this for my own project unless someone wakes me up
> 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
succeeds.

* 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.

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

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

-- 
Bruno Dumon                             http://outerthought.org/
Outerthought - Open Source, Java & XML Competence Support Center
bruno@outerthought.org                          bruno@apache.org


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