Return-Path: Delivered-To: apmail-cocoon-users-archive@www.apache.org Received: (qmail 82263 invoked from network); 24 Apr 2007 15:23:01 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 24 Apr 2007 15:23:01 -0000 Received: (qmail 94087 invoked by uid 500); 24 Apr 2007 15:23:03 -0000 Delivered-To: apmail-cocoon-users-archive@cocoon.apache.org Received: (qmail 94023 invoked by uid 500); 24 Apr 2007 15:23:03 -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 94008 invoked by uid 99); 24 Apr 2007 15:23:03 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 24 Apr 2007 08:23:03 -0700 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 (herse.apache.org: domain of ap-cocoon-users@m.gmane.org designates 80.91.229.2 as permitted sender) Received: from [80.91.229.2] (HELO ciao.gmane.org) (80.91.229.2) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 24 Apr 2007 08:22:56 -0700 Received: from list by ciao.gmane.org with local (Exim 4.43) id 1HgMqY-0000ig-Cu for users@cocoon.apache.org; Tue, 24 Apr 2007 17:22:26 +0200 Received: from h8922036201.dsl.speedlinq.nl ([89.220.36.201]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 24 Apr 2007 17:22:26 +0200 Received: from p.delmee by h8922036201.dsl.speedlinq.nl with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 24 Apr 2007 17:22:26 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: users@cocoon.apache.org From: Pieter Delmee Subject: Re: DynamicSelectionList filter parameter Date: Tue, 24 Apr 2007 17:20:25 +0200 Lines: 76 Message-ID: References: <009f01c7865b$de13bd50$4501a8c0@MIDDLEEARTH.IQUO.COM> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: h8922036201.dsl.speedlinq.nl User-Agent: Thunderbird 1.5.0.10 (Windows/20070221) In-Reply-To: <009f01c7865b$de13bd50$4501a8c0@MIDDLEEARTH.IQUO.COM> Sender: news X-Virus-Checked: Checked by ClamAV on apache.org Warrell wrote: > Hi, > > Can anyone shed a bit more light on how to user the filter parameter? The > documentation states :- > > This list is filterable, and if a filter is provided, the "filter" parameter > is appended to the URL, e.g. src="cocoon://pipeline.xml"/> will call, given the "foo" filter value, the > URL cocoon://pipeline.xml?filter=foo. > > Where do I specify the parameter value? What I would like to do is :- > > In the Template form define the selection list as > > > Source Code: > > > > > Then in the Instance form do something like :- > > > ${team} > > > So that in the sitemap I can do :- > > > > > value="{request-param:filter}"/> > > > > > Is this how it's supposed to work? I will take another look at the Java > source but any help would be very welcome, > > Regards > > Warrell Hi Warrell, You can set the filter in the fd:on-value-changed javascript. Using your sourcecode field you'ld need another field in which the filter is specified, for example: filter var sourcecodeWidget = this.lookupWidget('../sourcecode'); if (this.value != null) { sourcecodeWidget.setSelectionList('cocoon:/sources?filter=' + this.value); } else { sourcecodeWidget.setSelectionList('cocoon:/sources'); } You can also use the following lines to enable/disable the field when there's no filter specified. sourcecodeWidget.setState(Packages.org.apache.cocoon.forms.formmodel.WidgetState.ACTIVE); sourcecodeWidget.setState(Packages.org.apache.cocoon.forms.formmodel.WidgetState.DISABLED); regards, Pieter --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org For additional commands, e-mail: users-help@cocoon.apache.org