On 25.Jul.2002 -- 03:31 PM, Simon Price wrote:
> I've come up with a code-free workaround for the problem.
> 
> Quick reminder of the problem: HTML checkboxes do not submit a request 
> value if unchecked and hence DatabaseUpdateAction writes NULL into the 
> corresponding column in the database. In Cocoon 2.03 there in no way of 
> overriding this effective "NULL default".
> 
> What is more typically required is something like: when checked, write 
> "Y"; when unchecked, write "N". By adding a hidden input field of the 
> same name as the checkbox input field to your HTML form you can force a 
> non-NULL default.

Sorry to disappoint you, but the above does not work reliably: If
multiple fields with the same name exist, it completely depends on the
client in what order they are sent.

So, you get two values and when using the getAttributeValues() method,
you'll get an array ['Y','N']

        Chris.
-- 
C h r i s t i a n       H a u l
[EMAIL PROTECTED]
    fingerprint: 99B0 1D9D 7919 644A 4837  7D73 FEF9 6856 335A 9E08

---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail:     <[EMAIL PROTECTED]>
For additional commands, e-mail:   <[EMAIL PROTECTED]>

Reply via email to