Return-Path: Delivered-To: apmail-myfaces-users-archive@www.apache.org Received: (qmail 15422 invoked from network); 6 Oct 2006 13:09:41 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 6 Oct 2006 13:09:41 -0000 Received: (qmail 50672 invoked by uid 500); 6 Oct 2006 13:09:36 -0000 Delivered-To: apmail-myfaces-users-archive@myfaces.apache.org Received: (qmail 50628 invoked by uid 500); 6 Oct 2006 13:09:36 -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 50604 invoked by uid 99); 6 Oct 2006 13:09:36 -0000 Received: from idunn.apache.osuosl.org (HELO idunn.apache.osuosl.org) (140.211.166.84) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 06 Oct 2006 06:09:36 -0700 X-ASF-Spam-Status: No, hits=0.0 required=5.0 tests= Received: from [204.214.85.195] ([204.214.85.195:43660] helo=klkurz.com) by idunn.apache.osuosl.org (ecelerity 2.1.1.8 r(12930)) with ESMTP id 57/C9-18133-A8556254 for ; Fri, 06 Oct 2006 06:09:32 -0700 Received: from [127.0.0.1] by klkurz.com (MDaemon PRO v9.0.1) with ESMTP id md50000060030.msg for ; Fri, 06 Oct 2006 09:09:28 -0400 Message-ID: <45265586.7000300@klkurz.com> Date: Fri, 06 Oct 2006 09:09:26 -0400 From: Jeff Bischoff User-Agent: Thunderbird 1.5.0.7 (Windows/20060909) MIME-Version: 1.0 To: MyFaces Discussion Subject: Re: ValueChangeListener not called References: <20061006081959.135680@gmx.net> <311295120610060331g5f976c1ey41e60552c086f346@mail.gmail.com> In-Reply-To: <311295120610060331g5f976c1ey41e60552c086f346@mail.gmail.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-Authenticated-Sender: jbischoff@klkurz.com X-Spam-Processed: klkurz.com, Fri, 06 Oct 2006 09:09:28 -0400 (not processed: message from valid local sender) X-MDRemoteIP: 201.201.10.112 X-Return-Path: jbischoff@klkurz.com X-MDaemon-Deliver-To: users@myfaces.apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N The valueChangeListener can not fire from your code. >> > valueChangeListener="#{mybean.processValueChange}" >> onchange="submit();" value=""> >> >> Look, you have hard-coded the value! So how can the value ever change? And your original example code didn't even have a value attribute defined! Notice it's called *value*ChangeListener, not selectionChangeListener. :) Make the selectOneChoice's "value" attribute a value-binding expression that references a String property on some backing-bean. When you select something in the combo box, it will call the setter for that property, using the itemValue from the selectItem. It should also fire a valueChange event. Hope this helps. Regards, Jeff Bischoff Kenneth L Kurz & Associates, Inc. Gerald M�llan wrote: > Hi, > > have you put any message/messages-tag into the page, to see if there > comes some message from the jsf environment? > > Also set the "value" attribute of selectOneChoice to a value in the > managed bean., like "Nabe_Name" or "Kette_Name". Maybe thats the > problem. > > cheers, > > Gerald > > On 10/6/06, Peter Rabing wrote: >> Hi, >> >> "submit() " or "submit();" makes no difference, the form is submitted >> when a value in the combo is >> selected, sorry that I wasn't clear on this in my first post. >> >> My Bean does implement >> >> public void processValueChange(javax.faces.event.ValueChangeEvent >> valueChangeEvent) { >> >> log.fine("*************\n**********\nreceived value change event >> "+valueChangeEvent); >> >> throw new IllegalStateException("************ This can't be true >> **********"); >> } >> >> And the form is rendered in the HTML, too. >> >> The bean is called to retrieve the values of the combo: >> >> public SelectItem[] getFeatureValue_1() { >> SelectItem [] items = new SelectItem [2]; >> >> items[0] = new SelectItem( "Nabe_Name", "Nabenschaltung", >> "a desc"); >> items[1] = new SelectItem( "Kette_Name", "Kettenschaltung", >> "a desc"); >> >> return items; >> } >> >> The whole page is fairly stripped down now, but it still doesn' work: >> >> >> >> >> >> >> >> >> >> >> > valueChangeListener="#{mybean.processValueChange}" >> onchange="submit();" value=""> >> >> >> >> >> >> >> >> >> Any other ideas ? >> >> Thank you very much, >> >> Peter >> >> > >> > Does your bean implement the method public void >> > processValueChange(javax.faces.event.ValueChangeEvent event) {...} ? >> > >> > and >> > >> > Is the form rendered in the HTML output ? May be missing ? >> > >> > regards >> > >> > Marco >> > >> > -- >> > http://www.lenses-price-comparison.com >> > http://www.perfume-price-comparison.com >> > >> > >> > >> > Peter Rabing schrieb: >> > > Hi, >> > > >> > > I am trying to install a changelistener on a combo box. But >> unfortunately, nothing happens, no listener is called. >> > > The box is rendered correctly, and has the correct values on click >> it is submitted, but the listener is never called and no exception >> occurs: >> > > >> > > > valueChangeListener="#{mybean.processValueChange}" onchange="submit() "> >> > > >> > > >> > > >> > > My Bean implements the ValueChangeListener interface. >> > > >> > > I guess I am missing something essential here .. >> > > >> > > Thanks for your help. >> > > >> > > Peter >> > > >> -- >> Der GMX SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen! >> Ideal f�r Modem und ISDN: http://www.gmx.net/de/go/smartsurfer >> > >