cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christian Haul <h...@dvs1.informatik.tu-darmstadt.de>
Subject Re: ValidatorAction cleanup
Date Fri, 13 Jul 2001 08:10:18 GMT
On 12.Jul.2001 -- 03:16 PM, Berin Loritsch wrote:
> I want to clean up the Validator XSP page.  The reason is that I want
> to provide a markup that does not require me to embed <xsp:logic> tags
> in my forms.  Basically, it will be tags like the following:
> 
> <on-error name="field">
>   <warn>Display this message</warn>
> </on-error>
> <on-toosmall name="name">
>   <warn>Name needs to be at least 5 characters</warn>
> </on-toosmall>
> 
> 
> This cleans up the generated code, and is much more maintainable for the
> end user.  Does anyone have any input on preferred semantics?
> 

I remember that there have been discussions on this list whether to
duplicate e.g. if-then-else constructs in xsp tags. I believe the
consensus was that's not too good an idea.

Actually, I don't mind but this should really be an addition rather
than a replacement for the <is-ok> &c. tags.

For a real application I would envision a higher level taglib that
combines the validation with reading the request parameters and does
more form specific stuff.

     <form-lib:input type="text" name="fieldname" default="">
         <form-lib:label> <!-- tooltip or real label? -->
	     This is an input field
	 </form-lib:label>
	 <!-- even more things you can do with input field, javascript &c -->
         <form-lib:on-error>
	     <warn>Display this message</warn>
	 </form-lib:on-error>
     </form-lib:input>

So, maybe I would put it there rather than the form-validator. I will
have a go at this and the necessary stylesheet but currently I'm
trying to sensibly integrate Informix SERIAL columns into
DatabaseAddAction.... Probably a more modular approach to
DatabaseAddAction.

> Also, should this be 2.1 only, or should I make the functionality available
> for 2.0 as well?

It's not gonna break anything nor is it likely to introduce new bugs
so I'd say 2.0 should be OK.

	Chris.

-- 
C h r i s t i a n       H a u l
haul@informatik.tu-darmstadt.de
    fingerprint: 99B0 1D9D 7919 644A 4837  7D73 FEF9 6856 335A 9E08

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


Mime
View raw message