Return-Path: X-Original-To: apmail-myfaces-users-archive@www.apache.org Delivered-To: apmail-myfaces-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id CFD95E2A4 for ; Thu, 31 Jan 2013 16:52:55 +0000 (UTC) Received: (qmail 36458 invoked by uid 500); 31 Jan 2013 16:52:55 -0000 Delivered-To: apmail-myfaces-users-archive@myfaces.apache.org Received: (qmail 36398 invoked by uid 500); 31 Jan 2013 16:52: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 36389 invoked by uid 99); 31 Jan 2013 16:52:54 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 31 Jan 2013 16:52:54 +0000 X-ASF-Spam-Status: No, hits=2.7 required=5.0 tests=FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_REPLYTO_END_DIGIT,HTML_MESSAGE,RCVD_IN_DNSWL_NONE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [106.10.149.19] (HELO nm13-vm4.bullet.mail.sg3.yahoo.com) (106.10.149.19) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 31 Jan 2013 16:52:45 +0000 Received: from [106.10.166.62] by nm13.bullet.mail.sg3.yahoo.com with NNFMP; 31 Jan 2013 16:52:22 -0000 Received: from [106.10.151.122] by tm19.bullet.mail.sg3.yahoo.com with NNFMP; 31 Jan 2013 16:52:22 -0000 Received: from [127.0.0.1] by omp1004.mail.sg3.yahoo.com with NNFMP; 31 Jan 2013 16:52:22 -0000 X-Yahoo-Newman-Property: ymail-3 X-Yahoo-Newman-Id: 12699.26472.bm@omp1004.mail.sg3.yahoo.com Received: (qmail 68748 invoked by uid 60001); 31 Jan 2013 16:52:21 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1359651141; bh=xFKdLMB+4XXcmPb6N96c7tL4lLIuzSzBbP1kFClsI18=; h=X-YMail-OSG:Received:X-Rocket-MIMEInfo:X-Mailer:References:Message-ID:Date:From:Reply-To:Subject:To:In-Reply-To:MIME-Version:Content-Type; b=0Nd+Wf3PYZSUBzxhXY2IcyfakCaDXgp9ksqmN4fM8HsRP9H79DY2wW9FwWjqcY8n/V1DTbl9Hp1q4w1AfzzUZygcXjYY6ZPMmnMj4C+Rbcw0aqtZJ8RXkdBIo4b/yFCn21H+DHExdiOUJrD0mGbxvTy65BiEjHyNfTpISGJuNyY= DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=X-YMail-OSG:Received:X-Rocket-MIMEInfo:X-Mailer:References:Message-ID:Date:From:Reply-To:Subject:To:In-Reply-To:MIME-Version:Content-Type; b=SybW4RrGpROyyM4/aaasOCndjK8nQwOWp8/3ft+rvfelYc1nZwbaO+LJQHLB9AvSEywqXgyWt1YpwrZJc03hAx158V4/1yioV9Vfhg9IMZPL3mH0phY/DU/Yd7hG2T8JGUyfLgOOzV22ttz1v2HS8gV+3UfnbRlrJkE8N0ZL900=; X-YMail-OSG: SNERWckVM1l3kHYrS354dA3qVShvGXLx9RMpyujSml_hTxZ k9rBN3847MtCtfZYuioPmGs46N_1ZJoOR2bBTg_hR05LCHhG4CkP4xAznNPL bdffyFoEgVj0qAHNOzKd.2y466lazjljH_hzBxGTWRGY8ZoWNsBrYhUn9MkE 7vSmUAuBDfBLPAc7rofJO648e3GYw0yO3xo8A3geGrhYfGIvxAJp1DFLTNtY wIGVF3g0ToaCy4iF77sddKl8NipDqLhEVNNIAOlXkKfKX95ckFsMnZpC_Mum ncji1Y5TJOe85S_SeBaftCKrTwyBwP4TUEzEEWwIPhWU2ixfSqDAsjTmeIy9 MLo.ETK8K7xwHhYdAdWLUe9j5QIHwT32X4qU2QjBxqur.FK7wjd_sKdxX_Kc 7NASxotdOyo4lnhnZH8k5Ezwqb4eZznZf74VlFO6GGZUp Received: from [122.174.83.238] by web192701.mail.sg3.yahoo.com via HTTP; Fri, 01 Feb 2013 00:52:21 SGT X-Rocket-MIMEInfo: 001.001,CgozKSBEb2VzIHNlc3Npb24gc2NvcGVkIGhhdmUgdG8gYmUgdXNlZD8_IFRyeSB1c2luZyBhIGxpbWl0ZWQgc2NvcGUgc3VjaCBhcwpWaWV3U2NvcGVkIHdoZW4geW91IGRvbid0IG5lZWQgdG8gaGF2ZSBzZXNzaW9uIHNjb3BlZCBvYmplY3RzLgoKLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLQpJIG1hZGUgdGhlIGZvbGxvd2luZyBjaGFuZ2VzIDoKCsKgQ2hhbmdlZCB0aGUganNmIGZpbGUgdG8gdXNlIGNvdXJzZWlkLCBmb3IgdGhlIGxpc3QgYm94LCBhcyBpbiBiZWxvdyBjb2RlLgoKwqBNYWRlIHQBMAEBAQE- X-Mailer: YahooMailWebService/0.8.131.499 References: <1359551146.11217.YahooMailNeo@web192705.mail.sg3.yahoo.com> <51092193.1090808@senat.fr> Message-ID: <1359651141.68607.YahooMailNeo@web192701.mail.sg3.yahoo.com> Date: Fri, 1 Feb 2013 00:52:21 +0800 (SGT) From: Giri Prasad Reply-To: Giri Prasad Subject: Re: Jsf Hibernate problem in SelectOneList event To: MyFaces Discussion In-Reply-To: MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="-1452436326-299864723-1359651141=:68607" X-Virus-Checked: Checked by ClamAV on apache.org ---1452436326-299864723-1359651141=:68607 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable =0A=0A3) Does session scoped have to be used?? Try using a limited scope su= ch as=0AViewScoped when you don't need to have session scoped objects.=0A= =0A-------------------------------=0AI made the following changes :=0A=0A= =A0Changed the jsf file to use courseid, for the list box, as in below code= .=0A=0A=A0Made the bean to view scoped.=0A=0A=A0Implemented equals method u= sing Netbeans code gen function.=0A=0ASelecting a courseid from the list an= d pressing
button, produces the following error, on the web form:= =0A=0Aj_id_id12:studentList: Validation Error: Value is not valid =0A=0A=0A= =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 =0A=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0=A0=A0 =0A=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 = =0A=A0=0A@ManagedBean =0A@ViewScoped =0Apublic class StudBean implements Se= rializable=A0 { =0A=A0=0A=A0=A0=A0 @Override =0A=A0=A0=A0 public boolean eq= uals(Object obj) { =0A=A0=A0=A0=A0=A0=A0=A0 if (obj =3D=3D null) { =0A=A0= =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 return false; =0A=A0=A0=A0=A0=A0=A0=A0 } =0A= =A0=A0=A0=A0=A0=A0=A0 if (getClass() !=3D obj.getClass()) { =0A=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0 return false; =0A=A0=A0=A0=A0=A0=A0=A0 } =0A=A0=A0=A0= =A0=A0=A0=A0 final StudBean other =3D (StudBean) obj; =0A=0A=A0=A0=A0=A0=A0= =A0=A0 if ((this.courseID =3D=3D null) ? (other.courseID !=3D null) : !this= .courseID.equals(other.courseID)) { =0A=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 re= turn false; =0A=A0=A0=A0=A0=A0=A0=A0 } =0A=A0=A0=A0=A0=A0=A0=A0 return true= ; =0A=A0=A0=A0 } ---1452436326-299864723-1359651141=:68607--