jakarta-taglibs-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Winterfeldt <dwinterfe...@yahoo.com>
Subject RE: Form validation taglib
Date Tue, 17 Jul 2001 16:28:01 GMT
I developed the validation framework for Struts, but
it should be framework independant.  I rearchitected
recently to have it loosely coupled with Struts so it
could be used for general bean validation, but I
haven't documented it yet.  There is just a class that
is Struts specific that accesses the validation
classes.  The JavaScriptValidator (generates
JavaScript on a web page) tag is Struts specific, but
it would be easy to modify.  I think the only thing
the tag is using Struts for is to build the locale
sensitive error messages.  The tag basically loops
through the xml based on the key you pass in and
generates the appropriate JavaScript.

David

--- Nick Sharples <nick@eejits.net> wrote:
> In response to both Mike's and Ted's replies to my
> original posting... (my
> apologies if this posting is getting off the point
> of Taglibs. I originally
> intended the validation thing to be implemented as a
> taglib, honest!).
> 
> > -----Original Message-----
> > From: Ted Husted [mailto:husted@apache.org]
> > Sent: 12 July 2001 22:01
> > To: taglibs-dev@jakarta.apache.org;
> dwinterfeldt@apache.org
> > Subject: Re: Form validation taglib
> >
> >
> > David Winterfeldt has published a validation
> taglib that you might want
> > to look at. It creates both client-side Javascript
> validations and
> > serverside validations and is configured with an
> XML file. The
> > validations can be expressed as regular
> expressions or by writing custom
> > routines. I have used these extensively in my own
> projects.
> >
> 
> David Winterfeldt's validator was a great help, the
> Struts integration in
> particular.
> 
> I don't presume to improve on anybody's work.
> However, David's server-side
> validation is based on Struts where as the validator
> I've been working on is
> independent of a framework although it was
> originally intended to be
> implemented using a taglib wrapper.
> 
> I've updated the example webapp with an alternative
> to the taglib wrapper
> and added a Struts wrapper (my first journey into
> Struts so "could do
> better" :). David's example implements implements
> the validation Action as a
> class written specifically for the registration form
> bean. I've chosen
> (rightly or wrongly) to  instead implement a generic
> action for all form
> beans (the downloadable war file shows how this can
> be used).
> 
> > -----Original Message-----
> > From: Mike Cannon-Brookes
> [mailto:mcannon@internet.com]
> > Sent: 13 July 2001 03:30
> > To: taglibs-dev@jakarta.apache.org
> > Subject: RE: Form validation taglib
> >
> >
> > I would really like to see this work on
> Javascript/Schema validation
> > combined with Joseph Ottinger's brilliant Formtags
> library -
> > http://www.adjacency.org/formtags.jsp
> >
> > Formtags already has optional bean integration
> with OGNL and WebWork (IMHO
> > the best MVC framework). It's very simple to use,
> flexible and already has
> > basic JS integration (so you'd just need to plug
> in your JS / XML work!).
> >
> 
> As mentioned above, I've managed to write a wrapper
> (net.eejits.validation.struts package) of sorts that
> allows the validator to
> be used with struts. If somebody is more familiar
> with another MVC framework
> I'm sure it wouldn't be too difficult to add another
> wrapper package.
> 
> All recent changes are available at
> www.eejits.net/validation/
> 
> Thanks everyone for you responses.
> 
> Cheers,
> Nick
> 


__________________________________________________
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail
http://personal.mail.yahoo.com/

Mime
View raw message