cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vadim Gritsenko" <vadim.gritse...@verizon.net>
Subject RE: R: [RT] New validator and propagator infrastructure
Date Mon, 22 Oct 2001 13:33:20 GMT
> -----Original Message-----
> From: Paolo [mailto:lavoro@arsenio.net]
> Sent: Monday, October 22, 2001 9:30 AM
> To: cocoon-dev@xml.apache.org
> Subject: R: R: [RT] New validator and propagator infrastructure
> 
> Hi Vadim and Martin!
> 
> >type="checkbox" is quite simple: absent parameter - false, present
> >parameter - true.
> 
> >So we could use null as false and not null as true.
> 
> This is not true! The default value passed as request parameter for a
> checkbox is the 'On' string!

Exactly - "on" is the _default_ value. It could be replaced with any
other string (you cut that part). And nothing is passed when checkbox is
not checked (i.e., null).

> 
> And we want to use in the future the same descriptor file to validate
> not only request parameters, but session attributes or cookies, too...
> 
> A flag is always stored in an application as a boolean, not as a
> null/not-null value. The best way, in my opinion, is to use a
'boolean'
> parameter type (that we will compare with 'On', 'Yes', '1' and
'True').
> 
> For a checkbox, we can still use the 'nullable' flag with the
'default'
> value = 'false'.
> 
> Am I right?

Yes, that's good suggestions.

Vadim

> 
> Regards,
> Paolo Scaffardi
> AIRVENT SAM S.p.A.
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
> For additional commands, email: cocoon-dev-help@xml.apache.org


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


Mime
View raw message