Return-Path: Delivered-To: apmail-myfaces-users-archive@www.apache.org Received: (qmail 99573 invoked from network); 11 Jun 2010 20:26:57 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 11 Jun 2010 20:26:57 -0000 Received: (qmail 53953 invoked by uid 500); 11 Jun 2010 20:26:56 -0000 Delivered-To: apmail-myfaces-users-archive@myfaces.apache.org Received: (qmail 53808 invoked by uid 500); 11 Jun 2010 20:26:55 -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 53800 invoked by uid 99); 11 Jun 2010 20:26:55 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 11 Jun 2010 20:26:55 +0000 X-ASF-Spam-Status: No, hits=-0.5 required=10.0 tests=AWL,FREEMAIL_FROM,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of mkienenb@gmail.com designates 209.85.160.181 as permitted sender) Received: from [209.85.160.181] (HELO mail-gy0-f181.google.com) (209.85.160.181) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 11 Jun 2010 20:26:51 +0000 Received: by gya1 with SMTP id 1so1283574gya.12 for ; Fri, 11 Jun 2010 13:26:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:mime-version:received:in-reply-to :references:from:date:message-id:subject:to:content-type :content-transfer-encoding; bh=O6BFLfVHdhJBSQZSxu0KXXKbpg5HQe/pWEfGO/Jkuqk=; b=t+qUGAaEw4kQQ5KPJA2yYGkmv0+7VAB1H6vl50ffpsp/R/ELOkQ/QkQBnorjiEjkMC Ds4OUIWzfHdFdk0RXL32KeK6tuFGWF6niO1I8eUDUIiWLNZcAW5jvw2gbkJ2kNzJSsOi 2E4lAyzNWTUl7aP0PUsE3M0+izKwBkOZYcycY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type:content-transfer-encoding; b=dLs0xhplfLKmS1bMReBZrihh1aRe0doWb+VmhNB51pA/Lyu1ak/4v56/jBwOHucOsi hX1HpVfn7LNREpgE4AAmQt3a2JP+2prwf3CgDBG3d8j4XDoNZMiSKwD9TTYKaXYi/+zu Kpow94aOukq57ryDxVpFFNjygW1nIXXFn1gZc= Received: by 10.229.249.15 with SMTP id mi15mr1434118qcb.122.1276287989156; Fri, 11 Jun 2010 13:26:29 -0700 (PDT) MIME-Version: 1.0 Received: by 10.229.40.16 with HTTP; Fri, 11 Jun 2010 13:26:09 -0700 (PDT) In-Reply-To: <28859711.post@talk.nabble.com> References: <28858806.post@talk.nabble.com> <28858996.post@talk.nabble.com> <28859291.post@talk.nabble.com> <28859711.post@talk.nabble.com> From: Mike Kienenberger Date: Fri, 11 Jun 2010 16:26:09 -0400 Message-ID: Subject: Re: SelectManyListBox not working with aj4 To: MyFaces Discussion Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Sorry. I haven't used SelectManyListBox, so I can't be of much more help. One easy thing to try is to remove the a4j:support, move the actionListener to the SelectManyListBox, and try it as a non-ajax request. That will tell you if it's an ajax issue or a generic SelectManyListBox usage problem. On Fri, Jun 11, 2010 at 4:21 PM, sudeivas wrote: > > I just added value=3D"#{hostInfoBean.serviceType}" to the tag. And in the= java > bean the declaration is like , > private List serviceType =3D new ArrayList(); > > Is this correct? > > But still I am getting the same error, > hostInfo:serviceTypes: Validation Error: Value is not valid > hostInfo:serviceTypes: Validation Error: Value is not valid > > regards, > Suresh > > > Mike Kienenberger wrote: >> >> Hmm. =A0I am using Myfaces 1.2.9 and Richfaces 3.3.3, so it's possible >> that there's something different about it under Myfaces 2.0. >> >> Under my environment, using the following insures that messages are >> always rendered for ajax requests. =A0 =A0But rendering the messages isn= 't >> really your problem -- it's that the values aren't considered valid >> for your input. >> >> =A0 =A0 =A0 >> =A0 =A0 =A0 =A0 =A0 =A0 =A0 > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0globalOnly=3D"true" >> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0showDetail=3D"true" /> >> >> =A0 =A0 =A0 =A0 =A0 =A0 =A0 > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0globalOnly=3D"false" >> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0showDetail=3D"true" /> >> =A0 =A0 =A0 >> >> I just noticed that you don't have a [value=3D"#{}"] tag for your >> . =A0 Could this be the problem? >> >> >> >> On Fri, Jun 11, 2010 at 3:33 PM, sudeivas wrote: >>> >>> Now I tried with actionListener as well. But still I am getting the sam= e >>> warning. >>> >>> >>> =A0 =A0 =A0 =A0 >>> =A0 =A0 =A0 =A0>> actionListener=3D"#{hostInfoBean.changeServiceTypes}" >>> reRender=3D"hostInfo:gateKeeperendPointReference" ajaxSingle=3D"true"/> >>> >>> >>> WARNING: There are some unhandled FacesMessages, this means not every >>> FacesMessage had a chance to be rendered. >>> These unhandled FacesMessages are: >>> - hostInfo:serviceTypes: Validation Error: Value is not valid >>> >>> I am using Myfaces 2.0. May be there is an issue or a missing step that >>> we >>> need to configure before using a4j or valueChangeListener. >>> >>> I googled this warning and I got the below source code for this warning= . >>> >>> http://mail-archives.apache.org/mod_mbox/myfaces-commits/201004.mbox/%3= C20100401210944.40F4923889CB@eris.apache.org%3E >>> >>> But I didn't any other useful information. >>> >>> regards, >>> Suresh >>> >>> >>> >>> Mike Kienenberger wrote: >>>> >>>> My suggestion is to try it with an actionListener. =A0 I think you'll >>>> find that the model is populated with the current value of the list >>>> box by the time it executes, but you'll know for sure if you try it :) >>>> >>>> I converted a facelets page to ajax using only and >>>> , and it seemed to work well enough. =A0I =A0would not exp= ect >>>> any difference for JSP. >>>> >>>> The only issue I did hit was that reRendering a different part of the >>>> page after doing a resetValue() on components in the different part of >>>> the failed to fetch the model value for the component -- it continued >>>> to use the submitted value at the time of the ajax submit. >>>> >>>> On Fri, Jun 11, 2010 at 3:03 PM, sudeivas wrote= : >>>>> >>>>> I reason I didn't try with actionListener in a4j:support is that I am >>>>> not >>>>> sure whether it gives the list of values I have selected in the >>>>> SelectManyListBox. But valueChangeListener gives me the new value >>>>> selected. >>>>> >>>>> I have the same code working for an input text box but I am facing th= is >>>>> issue with SelectManyListBox. >>>>> >>>>> I am adding this SelectManyListBox to an existing JSP page. Do I have >>>>> to >>>>> do >>>>> anything specifically to overcome these types of warning message? >>>>> >>>>> regards, >>>>> Suresh >>>>> >>>>> >>>>> Mike Kienenberger wrote: >>>>>> >>>>>> I think the problem is that your valueChangeListener is not getting >>>>>> called as it's not an ajax call. =A0 Can you try changing it to an >>>>>> actionListener and putting the actionListener tag on your a4j:suppor= t? >>>>>> >>>>>> Also, I don't think you need to have immediate specified if you are >>>>>> using ajaxSingle=3D"true" >>>>>> >>>>>> Other than that, what you are doing looks similar to an >>>>>> h:selectOneListbox I have. >>>>>> >>>>>> On Fri, Jun 11, 2010 at 2:43 PM, sudeivas >>>>>> wrote: >>>>>>> >>>>>>> Hi, >>>>>>> =A0below is my JSF code, >>>>>>> >>>>>>> >>>>>>> >>>>>> immediate=3D"true" >>>>>>> valueChangeListener=3D"#{hostInfoBean.changeServiceTypes}"> >>>>>>> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0>>>>>> value=3D"#{hostInfoBean.serviceTypeItems}" >>>>>>> /> >>>>>>> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0>>>>>> reRender=3D"hostInfo:gateKeeperendPointReference" ajaxSingle=3D"tru= e"/> >>>>>>> >>>>>>> >>>>>>> >>>>>>> instead of form.submit(), i am using a4j to listen to the 'onchange= ' >>>>>>> event. >>>>>>> I am not getting any errors during the execution of the program. Bu= t >>>>>>> when >>>>>>> 'onchange' event occurs, its not calling the appropriate bean metho= d. >>>>>>> Instead I am getting an warning in the console, >>>>>>> >>>>>>> WARNING: There are some unhandled FacesMessages, this means not eve= ry >>>>>>> FacesMessage had a chance to be rendered. >>>>>>> These unhandled FacesMessages are: >>>>>>> - hostInfo:serviceTypes: Validation Error: Value is not valid >>>>>>> >>>>>>> I am not sure may be because of this it's not calling the bean >>>>>>> method. >>>>>>> >>>>>>> Please advise. >>>>>>> >>>>>>> regards, >>>>>>> Suresh >>>>>>> -- >>>>>>> View this message in context: >>>>>>> http://old.nabble.com/SelectManyListBox-not-working-with-aj4-tp2885= 8806p28858806.html >>>>>>> Sent from the MyFaces - Users mailing list archive at Nabble.com. >>>>>>> >>>>>>> >>>>>> >>>>>> >>>>> >>>>> -- >>>>> View this message in context: >>>>> http://old.nabble.com/SelectManyListBox-not-working-with-aj4-tp288588= 06p28858996.html >>>>> Sent from the MyFaces - Users mailing list archive at Nabble.com. >>>>> >>>>> >>>> >>>> >>> >>> -- >>> View this message in context: >>> http://old.nabble.com/SelectManyListBox-not-working-with-aj4-tp28858806= p28859291.html >>> Sent from the MyFaces - Users mailing list archive at Nabble.com. >>> >>> >> >> > > -- > View this message in context: http://old.nabble.com/SelectManyListBox-not= -working-with-aj4-tp28858806p28859711.html > Sent from the MyFaces - Users mailing list archive at Nabble.com. > >