Return-Path: Delivered-To: apmail-myfaces-users-archive@www.apache.org Received: (qmail 58504 invoked from network); 6 Apr 2010 10:28:16 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 6 Apr 2010 10:28:16 -0000 Received: (qmail 59777 invoked by uid 500); 6 Apr 2010 10:28:15 -0000 Delivered-To: apmail-myfaces-users-archive@myfaces.apache.org Received: (qmail 59678 invoked by uid 500); 6 Apr 2010 10:28:14 -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 59670 invoked by uid 99); 6 Apr 2010 10:28:14 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 06 Apr 2010 10:28:14 +0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests=FREEMAIL_FROM,SPF_HELO_PASS,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of lists@nabble.com designates 216.139.236.158 as permitted sender) Received: from [216.139.236.158] (HELO kuber.nabble.com) (216.139.236.158) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 06 Apr 2010 10:28:07 +0000 Received: from isper.nabble.com ([192.168.236.156]) by kuber.nabble.com with esmtp (Exim 4.63) (envelope-from ) id 1Nz60Y-0008N9-NT for users@myfaces.apache.org; Tue, 06 Apr 2010 03:27:46 -0700 Message-ID: <28149826.post@talk.nabble.com> Date: Tue, 6 Apr 2010 03:27:46 -0700 (PDT) From: "kishore.sadanandam" To: users@myfaces.apache.org Subject: issue with setting backing bean values MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Nabble-From: kishore.sadanandam@gmail.com X-Virus-Checked: Checked by ClamAV on apache.org Hi, I have an issue using component in my JSF page. Issue: When I have a submit button in my form outside all subforms, on clicking this button components inside subform are not set with values in my backing bean. Reproduce steps: 1. Create a new JSF page, say SubformTest.jspx, as below. 2. Create managed bean "SubformPageBean" in request scope with new class apache.trinidad.test.SubformPageBean 3. Create managed bean "SubformPageBean" Java class as below: public class SubformPageBean { private String firstName; private String middleName; private String lastName; private String address; public SubformPageBean() { } public void setFirstName(String firstName) { this.firstName = firstName; } public String getFirstName() { return firstName; } public void setMiddleName(String middleName) { this.middleName = middleName; } public String getMiddleName() { return middleName; } public void setLastName(String lastName) { this.lastName = lastName; } public String getLastName() { return lastName; } public void setAddress(String address) { this.address = address; } public String getAddress() { return address; } public String apply(){ System.out.println("Clicked: apply"); printValues(); return null; } public String apply1(){ System.out.println("Clicked: apply1"); printValues(); return null; } public String apply2(){ System.out.println("Clicked: apply2"); printValues(); return null; } public void printValues(){ System.out.println("First Name: "+firstName); System.out.println("Middle Name: "+middleName); System.out.println("Last Name: "+lastName); System.out.println("Address: "+address); } } 4. Run created JSF page SubformTest.jspx after deploying it to server. 5. Clicking "Apply 1" button will print values like below in System.out: [STDOUT] Clicked: apply1 [STDOUT] First Name: Kishore [STDOUT] Middle Name: Katikala [STDOUT] Last Name: Sadanandam [STDOUT] Address: null 6. Clicking "Apply 2" button will print values like below in System.out: [STDOUT] Clicked: apply2 [STDOUT] First Name: null [STDOUT] Middle Name: null [STDOUT] Last Name: null [STDOUT] Address: Chennai 7. Clicking "Apply" button will print values like below in System.out: [STDOUT] Clicked: apply [STDOUT] First Name: null [STDOUT] Middle Name: null [STDOUT] Last Name: null [STDOUT] Address: null Questions: In step 7, I am expecting all subform components value set properly since the button exists in scope of the form. This kind of behaviour is easily achieved using multiple instead. Is this a bug with that require fix? Is there any workaround to this? Regards, Kishore K S -- View this message in context: http://old.nabble.com/%3Ctr%3Asubform%3E-issue-with-setting-backing-bean-values-tp28149826p28149826.html Sent from the MyFaces - Users mailing list archive at Nabble.com.