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 [EMAIL PROTECTED] [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
