Return-Path: Delivered-To: apmail-myfaces-users-archive@www.apache.org Received: (qmail 51303 invoked from network); 9 Sep 2009 14:46:37 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 9 Sep 2009 14:46:37 -0000 Received: (qmail 11634 invoked by uid 500); 9 Sep 2009 14:46:34 -0000 Delivered-To: apmail-myfaces-users-archive@myfaces.apache.org Received: (qmail 11571 invoked by uid 500); 9 Sep 2009 14:46:34 -0000 Mailing-List: contact users-help@myfaces.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "MyFaces Discussion" Delivered-To: mailing list users@myfaces.apache.org Received: (qmail 11498 invoked by uid 99); 9 Sep 2009 14:46:34 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 09 Sep 2009 14:46:34 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of general.equal.700@gmail.com designates 209.85.221.189 as permitted sender) Received: from [209.85.221.189] (HELO mail-qy0-f189.google.com) (209.85.221.189) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 09 Sep 2009 14:46:24 +0000 Received: by qyk27 with SMTP id 27so738024qyk.13 for ; Wed, 09 Sep 2009 07:46:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:from:to :in-reply-to:content-type:content-transfer-encoding:x-mailer :mime-version:subject:date:references; bh=TQ2R4zxgxm7BbQyVxXPWwOUV3tzC1OtqbdRKjy7jICk=; b=jfRfi4e01jCXu+sfqPJtQxT2tqpMhsRKnmgV/9SlonFjTOVOL8J5Sgh4T33466ElHs t+2gDsGy9oCCWAYT0YHegK7q9aGpGcr41RwJCgaXlTyn0w1htO7Gzh6JSqML25NEG/cy m91iofVgkm6RGDyeVi2B4cXfrr9pKzZF/LSC0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:from:to:in-reply-to:content-type :content-transfer-encoding:x-mailer:mime-version:subject:date :references; b=XJ3e2O+W9qv6B8T6vSkobG30wEhul2Iu8aly983uX0RmXjJDq0eMnKRSMRhkQnGssZ mgMZR+rrjtR30/8683LGwnzL8C8xN+3+ATSw1XTvEQvkLD00q3gqpNXhBtm3qweN9Ngr 6jNjJG/Eo0kneOAZ6gKQz3kca1BivuDOPniNQ= Received: by 10.224.44.157 with SMTP id a29mr245225qaf.1.1252507562429; Wed, 09 Sep 2009 07:46:02 -0700 (PDT) Received: from ?10.91.37.144? (mobile-166-137-134-047.mycingular.net [166.137.134.47]) by mx.google.com with ESMTPS id 2sm69348qwi.27.2009.09.09.07.45.57 (version=TLSv1/SSLv3 cipher=RC4-MD5); Wed, 09 Sep 2009 07:46:01 -0700 (PDT) Message-Id: From: Omar Elprince To: MyFaces Discussion In-Reply-To: <52A646452EB3AB40B87EB3F2BA17342E05B249D8@gzs-msx-3.gzs.de> Content-Type: text/plain; charset=utf-8; format=flowed; delsp=yes Content-Transfer-Encoding: quoted-printable X-Mailer: iPhone Mail (7A400) Mime-Version: 1.0 (iPhone Mail 7A400) Subject: Re: AW: [Trinidad] How to use an iterator, selectOneChoice and partialTriggers? Date: Wed, 9 Sep 2009 10:45:07 -0400 References: <52A646452EB3AB40B87EB3F2BA17342E05B249D8@gzs-msx-3.gzs.de> X-Virus-Checked: Checked by ClamAV on apache.org Use immediate=3D"true" --Omar On Sep 9, 2009, at 8:24 AM, "Roeder, Andreas" = wrote: > Thanx a lot, that worked like a glue. Just one problem is left: all =20= > the selectOneChoice components are on required=3D"true". How can I =20 > avoid the validation? > > I already tried to call at the end of the ValueChangeListener the =20 > call: > > FacesContext.getCurrentInstance().renderResponse(); > > but no success. > > -Andreas > > -----Urspr=C3=BCngliche Nachricht----- > Von: Andrew Robinson [mailto:andrew.rw.robinson@gmail.com] > Gesendet: Montag, 7. September 2009 02:46 > An: MyFaces Discussion > Betreff: Re: [Trinidad] How to use an iterator, selectOneChoice and =20= > partialTriggers? > > > If you give partial triggers an EL expression it must evaluate to =20 > type String[]. The value change listener is fired for the current =20 > iteration, so if you click item 3, the event will be broadcast for =20 > the selectOneChoice inside the index 2 of tr:iterator. To move the =20 > iterator to a new index you need to save the current row index, set =20= > the new index, evaluate code and then set it back. > > An iterator stamps out one component and a component only has 1 ID, =20= > so you cannot put EL in the ID like you did below. I would advise =20 > using if you need to store the ID on the component, =20 > but just give the choice a static ID. > > The resulting IDs on the client will be like "i1:0:soc1", =20 > "i1:1:soc1", etc if your iterator had ID "i1" and your =20 > selectOneChoice had ID "soc1". So the :#: in between represents the =20= > stamp index. > > -Andrew > > On Fri, Sep 4, 2009 at 7:32 AM, Roeder, = Andreas > wrote: >> I'm trying to create generic selectOneChoice elements. When the first >> selectOneChoice value changes it should update the next one in the >> list and so on. I tried to do that via the id, partialTriggers and a >> ValueChangeListener: >> >> > var=3D"field"> >> > id=3D"#{field.id}" >> partialTriggers=3D"#{field.partialTriggers}" >> valueChangeListener=3D"#{genericFormBean.valueChange}" >> value=3D"#{genericFormBean.formDesc.modelMap[field.id]}" >> > >> value=3D"#{genericFormBean.selectItemMap[field.itemList]}" /> >> >> >> >> But I cannot set the id of the selectOneChoice element. When I try to >> get the other selectOneChoice elements in the valueChangeListener I >> just see one element in the iterator.childs() collection. Why is =20 >> that? >> >> I also tried to use a custom renderer to set the id, but as soon I >> change the id of one selectOneChoice element all other elements are >> getting the same id. It's pretty confusing to me. >> >> Is there another way to do that? >> >> Best Regards, >> >> Andreas >> >> >