Return-Path: Delivered-To: apmail-cocoon-users-archive@www.apache.org Received: (qmail 37115 invoked from network); 1 Sep 2004 15:29:46 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 1 Sep 2004 15:29:46 -0000 Received: (qmail 989 invoked by uid 500); 1 Sep 2004 15:28:46 -0000 Delivered-To: apmail-cocoon-users-archive@cocoon.apache.org Received: (qmail 887 invoked by uid 500); 1 Sep 2004 15:28:44 -0000 Mailing-List: contact users-help@cocoon.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: list-post: Reply-To: users@cocoon.apache.org Delivered-To: mailing list users@cocoon.apache.org Received: (qmail 781 invoked by uid 99); 1 Sep 2004 15:28:42 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: pass (hermes.apache.org: local policy) Received: from [165.98.147.95] (HELO ags01.agsoftware.dnsalias.com) (165.98.147.95) by apache.org (qpsmtpd/0.28) with ESMTP; Wed, 01 Sep 2004 08:28:40 -0700 Received: from ags01.agsoftware.dnsalias.com (localhost.localdomain [127.0.0.1]) by ags01.agsoftware.dnsalias.com (8.12.11/8.12.10) with ESMTP id i81FSaOS007126 for ; Wed, 1 Sep 2004 09:28:36 -0600 Received: (from apache@localhost) by ags01.agsoftware.dnsalias.com (8.12.11/8.12.11/Submit) id i81FSaL4007125; Wed, 1 Sep 2004 09:28:36 -0600 X-Authentication-Warning: ags01.agsoftware.dnsalias.com: apache set sender to cchavez@agsoftware.dnsalias.com using -f Received: from 10.0.0.1 (SquirrelMail authenticated user cchavez); by ags01.agsoftware.dnsalias.com with HTTP; Wed, 1 Sep 2004 09:28:36 -0600 (CST) Message-ID: <57930.10.0.0.1.1094052516.squirrel@10.0.0.1> In-Reply-To: <4135B9E6.4070807@juwimm.com> References: <5E091A68F794974CAF431CA31F5AF2CC11E962@server.bizzdesign.nl> <4135B9E6.4070807@juwimm.com> Date: Wed, 1 Sep 2004 09:28:36 -0600 (CST) Subject: Re: CForms booleanfield validate problem From: Carlos =?iso-8859-1?Q?Ch=E1vez?= To: users@cocoon.apache.org Reply-To: cchavez@agsoftware.dnsalias.com User-Agent: SquirrelMail/1.4.3a-1 X-Mailer: SquirrelMail/1.4.3a-1 MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Priority: 3 (Normal) Importance: Normal X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N Hi Patrick, I have a form with boolean field, i can test the value of the boolean field, can you post the definition of the widget and the validate code ? Cheers. Patrick Verboom Escribio :-) > Hi Bart, > > It is a law thing. The user needs to agree before he may continue in the > flow. So I wanted to validate the form and look if the check box was > checked if not set an validate error message. The problem is that in the > validate method of the form the boolean field always false is. Now I > have to use a while loop in the flow script that checks the boolean > field. I don't think this isn't the way it is supposed to be. > > greetings patrick > > Bart Molenkamp wrote: > >>Hi Patrick, >> >>What do you want to validate about a boolean field? >>A boolean field can only contain valid values. It's value, either true >>or false, are always valid values for a boolean. So it returns always >>true. See this code snippet from BooleanField.java: >> /** >> * Always return true (an action has no validation) >> * >> * TODO is there a use case for boolean fields having validators? >> */ >> public boolean validate() { >> // a boolean field is always valid >> return true; >> } >> >>But maybe I don't understand your question. >>Bart. >> >>-----Original Message----- >>From: Patrick Verboom [mailto:patrick.verboom@juwimm.com] >>Sent: Wednesday, September 01, 2004 11:04 AM >>To: users@cocoon.apache.org >>Subject: CForms booleanfield validate problem >> >>Hi, >> >>How do you validate a boolean field? >>I tried to use my own validate method on the complete form but the >>boolean field keeps sending me a false. It doesn't mater if I select or >>deselect the check box the thing keeps giving me a false. >>I now created a not so elegant solution over a hidden field and a >>on-value-change but there must be a better solution. >> >>Greetings Patrick >> >>--------------------------------------------------------------------- >>To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org >>For additional commands, e-mail: users-help@cocoon.apache.org >> >> >>--------------------------------------------------------------------- >>To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org >>For additional commands, e-mail: users-help@cocoon.apache.org >> >> >> > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org > For additional commands, e-mail: users-help@cocoon.apache.org > -- Carlos Ch�vez --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org For additional commands, e-mail: users-help@cocoon.apache.org