cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bruno Dumon <br...@outerthought.org>
Subject RE: Woody
Date Thu, 24 Apr 2003 10:31:38 GMT
On Thu, 2003-04-24 at 04:20, Geoff Howard wrote:
> > -----Original Message-----
> > From: Bruno Dumon [mailto:bruno@outerthought.org]
> > >
> > > 1) good to notice that form declarations and form templates are
> > > separated: a must-have in my eyes
> > >
> > > 2) client-side validations are not handled (yet)... I brewed my own
> > > (XSLT-based) solution because current form handling mechanisms lack
> > > this: could you spare a thought on this issue ?
> > >
> > > 3) Hooks for Javascript events: I've found them a necessity. For
> > > instance, disabling a list box when a check-box has been checked
> > >
> >
> > For both points 2 and 3 I'm not sure yet how I'm going to tackle it.
> > More specifically, I'm undecided yet whether the framework should
> > automatically generate Javascript or just provide the hooks to call your
> > own javascript methods.
> >
> > Letting the framework automatically generate the code makes it harder
> > for the framework implementer. In the case the form-designer writes the
> > javascript him/herself, there could be problems when what the
> > client-side code does and what the server-side code does are
> > inconsistent.
> >
> 
> How about providing these levels of auto-generated/custom validation:
> - required (auto-generated) simply check for any value
> - regex (auto-generated) match value against regex (could couple with or
>   without required).  Are javascript regex and java regex (jdk 1.4 or
>   jakarta's for older) compatible enough?
> - custom (manual) name of function to call, probably with no argument.
> 
> Sorry in advance if this betrays ignorance of what you've got so far.

I've done nothing about client-side validation yet, so don't worry :-)

Translating validation rules to client-side javascript should be quite
doable, some validation rules will probably just not be translatable,
and others will.

The case of e.g. disabling a list box based on the state of checkbox
made me think that if in the form definition this dependency is defined,
the framework could automatically generate the necessary event listeners
etc to do this, and this part is more complex than the validation rules.

I've got to say though that all this client-side javascript things are
not a high priority for me personally.

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


Mime
View raw message