Return-Path: Delivered-To: apmail-xml-cocoon-users-archive@xml.apache.org Received: (qmail 96464 invoked by uid 500); 25 Jul 2002 14:55:14 -0000 Mailing-List: contact cocoon-users-help@xml.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: list-post: Reply-To: cocoon-users@xml.apache.org Delivered-To: mailing list cocoon-users@xml.apache.org Received: (qmail 96451 invoked from network); 25 Jul 2002 14:55:13 -0000 Message-ID: <3D401168.8050506@bristol.ac.uk> Date: Thu, 25 Jul 2002 15:55:36 +0100 From: Simon Price User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-GB; rv:0.9.4) Gecko/20011019 Netscape6/6.2 X-Accept-Language: en-gb MIME-Version: 1.0 To: cocoon-users@xml.apache.org Subject: [SUMMARY] how to use a checkbox with DatabaseUpdateAction References: <20020724140646.A1902@bremen.dvs1.informatik.tu-darmstadt.de> <3D3FFCC9.2020609@bristol.ac.uk> <3D400BCC.6020801@bristol.ac.uk> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N Take 2... this time with correct summary prefix in email title :-))) --- 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. eg. my version of simple-page.xsl generates HTML for a checkbox as... true When the box is checked, the Y is written, but when unchecked, the N is written. Cheers Simon PS. Tested with Cocoon 2.03, Java 1.3.1, Tomcat 4.01, IE6 and NS6 ------------------------------------------------------------------- Simon Price Institute for Learning and Research Technology University of Bristol 8-10 Berkeley Square Bristol BS8 1HH United Kingdom Direct: +44 (0)7071 226 720 Office: +44 (0)117 928 7193 Fax: +44 (0)117 928 7112 Simon.Price@bristol.ac.uk http://www.ilrt.bristol.ac.uk --------------------------------------------------------------------- Please check that your question has not already been answered in the FAQ before posting. To unsubscribe, e-mail: For additional commands, e-mail: