Return-Path: Delivered-To: apmail-cocoon-users-archive@www.apache.org Received: (qmail 24595 invoked from network); 21 Nov 2008 00:39:40 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 21 Nov 2008 00:39:40 -0000 Received: (qmail 88512 invoked by uid 500); 21 Nov 2008 00:39:43 -0000 Delivered-To: apmail-cocoon-users-archive@cocoon.apache.org Received: (qmail 88442 invoked by uid 500); 21 Nov 2008 00:39:43 -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 88431 invoked by uid 99); 21 Nov 2008 00:39:43 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 20 Nov 2008 16:39:43 -0800 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of grek@tuffmail.com designates 216.86.168.183 as permitted sender) Received: from [216.86.168.183] (HELO mxout-08.mxes.net) (216.86.168.183) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 21 Nov 2008 00:38:19 +0000 Received: from [192.168.0.125] (unknown [82.210.157.165]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.mxes.net (Postfix) with ESMTP id CE4C3D05AE for ; Thu, 20 Nov 2008 19:38:03 -0500 (EST) Message-ID: <492602EA.6020207@tuffmail.com> Date: Fri, 21 Nov 2008 01:38:02 +0100 From: Grzegorz Kossakowski User-Agent: Thunderbird 2.0.0.17 (X11/20080922) MIME-Version: 1.0 To: users@cocoon.apache.org Subject: Re: CForm Get all Widgets References: In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Virus-Checked: Checked by ClamAV on apache.org Gary Larsen pisze: > Hi Gurus, > > > > I’m creating a form definition dynamically and have set up a Java > ValueChangedListener on all the Widgets. > > > > My problem if that I need to iterate though all the widgets on the form > in the listener. Since the form is dynamic I do not know the widget > names. I could not find any method to get a list of all the widgets. > > > > Is this possible? I’m running 2.1.9. ‘ > > > > Thanks for any advice! Hi Gary, Take a look at WidgetEvent[1], from there you can obtain original widget. Once you have a widget, you can obtain a Form using getForm() and from there you call getChildren(). HTH. [1] http://cocoon.apache.org/2.1/apidocs/org/apache/cocoon/forms/event/WidgetEvent.html [2] http://cocoon.apache.org/2.1/apidocs/org/apache/cocoon/forms/formmodel/Widget.html -- Grzegorz Kossakowski --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org For additional commands, e-mail: users-help@cocoon.apache.org