Return-Path: Delivered-To: apmail-cocoon-users-archive@www.apache.org Received: (qmail 37353 invoked from network); 30 Jul 2007 11:41:37 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 30 Jul 2007 11:41:37 -0000 Received: (qmail 74907 invoked by uid 500); 30 Jul 2007 11:41:35 -0000 Delivered-To: apmail-cocoon-users-archive@cocoon.apache.org Received: (qmail 74670 invoked by uid 500); 30 Jul 2007 11:41:34 -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 List-Id: Delivered-To: mailing list users@cocoon.apache.org Received: (qmail 74659 invoked by uid 99); 30 Jul 2007 11:41:34 -0000 Received: from Unknown (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 30 Jul 2007 04:41:34 -0700 X-ASF-Spam-Status: No, hits=2.0 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [194.45.156.2] (HELO agp.nl) (194.45.156.2) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 30 Jul 2007 11:41:30 +0000 Content-class: urn:content-classes:message Subject: RE: Cforms JavaSelectionList default entry MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----_=_NextPart_001_01C7D29E.521F57C0" Date: Mon, 30 Jul 2007 13:39:40 +0200 X-MimeOLE: Produced By Microsoft Exchange V6.5 Message-ID: <50EF6CAD028DF844B9F60BCB3F79AD2F1E25AA@agp-dc1.AGP.local> In-Reply-To: X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: Cforms JavaSelectionList default entry Thread-Index: AcfSmnEUFrdeMT2QRLSMePTrUsp/AQAAqQ0g References: From: "Robby Pelssers" To: X-Virus-Checked: Checked by ClamAV on apache.org ------_=_NextPart_001_01C7D29E.521F57C0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Quite easy, =20 Suppose you create a StaticSelectionList=20 =20 you can iterate over your resultset and call addItem(Object value) =20 Then on your Field (widget) you add the selectionlist setSelectionList (SelectionList selectionList)=20 =20 You can define a default value in your formdefinition or just call=20 setValue(defaultvalue) of the Field(widget) after the form is loaded. =20 Hope this answers your question. =20 Cheers, Robby ________________________________ Van: Markus Kratz [mailto:markuskratz@googlemail.com]=20 Verzonden: maandag, juli 2007 13:13 Aan: users@cocoon.apache.org Onderwerp: Cforms JavaSelectionList default entry Hi, I want to create a dynamic JavaSelectionList out of the database. But how can I define a default checked button without JavaScript, which is selected when the form is loaded the first time?=20 Best regards, Markus Kratz ------_=_NextPart_001_01C7D29E.521F57C0 Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable
Quite easy,
 
Suppose you create a StaticSelectionList=20
 
you can iterate over your resultset and call = addItem(Object=20 value)
 
Then on your Field (widget) you add the=20 selectionlist  setSelectionList(SelectionList selectionList) =
 
You=20 can define a default value in your formdefinition or just call=20
setValue(defaultvalue) of the Field(widget) after the form is=20 loaded.
 
Hope this=20 answers your question.
 
Cheers,
Robby



Van: Markus Kratz=20 [mailto:markuskratz@googlemail.com]
Verzonden: maandag, juli = 2007=20 13:13
Aan: users@cocoon.apache.org
Onderwerp: Cforms = JavaSelectionList default entry

Hi,

I want to create a dynamic JavaSelectionList out = of the=20 database. But how can I define a default checked button without = JavaScript,=20 which is selected when the form is loaded the first time?

Best regards,
Markus=20 Kratz

------_=_NextPart_001_01C7D29E.521F57C0--