<< http://java.net/jira/browse/JAVASERVERFACES-1943 >> SECTION: Modified Files ---------------------------- M jsf-ri/src/main/java/com/sun/faces/facelets/el/ContextualCompositeMethodExpression.java --- Make UIComponent "cc" ivar transient M jsf-test/build.xml --- Include JAVASERVERFACES-1943 in test harness. A jsf-test/JAVASERVERFACES-1943 A jsf-test/JAVASERVERFACES-1943/htmlunit A jsf-test/JAVASERVERFACES-1943/htmlunit/src A jsf-test/JAVASERVERFACES-1943/htmlunit/src/main A jsf-test/JAVASERVERFACES-1943/htmlunit/src/main/java A jsf-test/JAVASERVERFACES-1943/htmlunit/src/main/java/com A jsf-test/JAVASERVERFACES-1943/htmlunit/src/main/java/com/sun A jsf-test/JAVASERVERFACES-1943/htmlunit/src/main/java/com/sun/faces A jsf-test/JAVASERVERFACES-1943/htmlunit/src/main/java/com/sun/faces/systest A jsf-test/JAVASERVERFACES-1943/htmlunit/src/main/java/com/sun/faces/systest/Issue1943TestCase.java --- HtmlUnit test A jsf-test/JAVASERVERFACES-1943/htmlunit/pom.xml A jsf-test/JAVASERVERFACES-1943/i_jsf_1943 A jsf-test/JAVASERVERFACES-1943/i_jsf_1943/src A jsf-test/JAVASERVERFACES-1943/i_jsf_1943/src/main A jsf-test/JAVASERVERFACES-1943/i_jsf_1943/src/main/java A jsf-test/JAVASERVERFACES-1943/i_jsf_1943/src/main/java/vc A jsf-test/JAVASERVERFACES-1943/i_jsf_1943/src/main/java/vc/Bean.java --- Test Bean A jsf-test/JAVASERVERFACES-1943/i_jsf_1943/src/main/webapp A jsf-test/JAVASERVERFACES-1943/i_jsf_1943/src/main/webapp/Index_action.xhtml A jsf-test/JAVASERVERFACES-1943/i_jsf_1943/src/main/webapp/Index.xhtml A jsf-test/JAVASERVERFACES-1943/i_jsf_1943/src/main/webapp/template.xhtml --- Test pages A jsf-test/JAVASERVERFACES-1943/i_jsf_1943/src/main/webapp/WEB-INF A jsf-test/JAVASERVERFACES-1943/i_jsf_1943/src/main/webapp/WEB-INF/faces-config.xml A jsf-test/JAVASERVERFACES-1943/i_jsf_1943/src/main/webapp/WEB-INF/web.xml A jsf-test/JAVASERVERFACES-1943/i_jsf_1943/src/main/webapp/WEB-INF/classes A jsf-test/JAVASERVERFACES-1943/i_jsf_1943/src/main/webapp/WEB-INF/classes/test A jsf-test/JAVASERVERFACES-1943/i_jsf_1943/src/main/webapp/resources A jsf-test/JAVASERVERFACES-1943/i_jsf_1943/src/main/webapp/resources/components A jsf-test/JAVASERVERFACES-1943/i_jsf_1943/src/main/webapp/resources/components/vccomponent.xhtml A jsf-test/JAVASERVERFACES-1943/i_jsf_1943/src/main/webapp/resources/components/outer.xhtml A jsf-test/JAVASERVERFACES-1943/i_jsf_1943/src/main/webapp/resources/components/component1.xhtml --- Test composite component pages A jsf-test/JAVASERVERFACES-1943/i_jsf_1943/pom.xml A jsf-test/JAVASERVERFACES-1943/build.xml SECTION: Diffs ---------------------------- Index: jsf-ri/src/main/java/com/sun/faces/facelets/el/ContextualCompositeMethodExpression.java =================================================================== --- jsf-ri/src/main/java/com/sun/faces/facelets/el/ContextualCompositeMethodExpression.java (revision 9035) +++ jsf-ri/src/main/java/com/sun/faces/facelets/el/ContextualCompositeMethodExpression.java (working copy) @@ -129,7 +129,7 @@ private final MethodExpression delegate; private final ValueExpression source; private final Location location; - private final UIComponent cc; + private final transient UIComponent cc; // -------------------------------------------------------- Constructors Index: jsf-test/JAVASERVERFACES-1943/htmlunit/src/main/java/com/sun/faces/systest/Issue1943TestCase.java =================================================================== --- jsf-test/JAVASERVERFACES-1943/htmlunit/src/main/java/com/sun/faces/systest/Issue1943TestCase.java (revision 0) +++ jsf-test/JAVASERVERFACES-1943/htmlunit/src/main/java/com/sun/faces/systest/Issue1943TestCase.java (revision 0) @@ -0,0 +1,116 @@ +/* + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. + * + * Copyright (c) 1997-2011 Oracle and/or its affiliates. All rights reserved. + * + * The contents of this file are subject to the terms of either the GNU + * General Public License Version 2 only ("GPL") or the Common Development + * and Distribution License("CDDL") (collectively, the "License"). You + * may not use this file except in compliance with the License. You can + * obtain a copy of the License at + * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html + * or packager/legal/LICENSE.txt. See the License for the specific + * language governing permissions and limitations under the License. + * + * When distributing the software, include this License Header Notice in each + * file and include the License file at packager/legal/LICENSE.txt. + * + * GPL Classpath Exception: + * Oracle designates this particular file as subject to the "Classpath" + * exception as provided by Oracle in the GPL Version 2 section of the License + * file that accompanied this code. + * + * Modifications: + * If applicable, add the following below the License Header, with the fields + * enclosed by brackets [] replaced by your own identifying information: + * "Portions Copyright [year] [name of copyright owner]" + * + * Contributor(s): + * If you wish your version of this file to be governed by only the CDDL or + * only the GPL Version 2, indicate your decision by adding "[Contributor] + * elects to include this software in this distribution under the [CDDL or GPL + * Version 2] license." If you don't indicate a single choice of license, a + * recipient has the option to distribute your version of this file under + * either the CDDL, the GPL Version 2 or to extend the choice of license to + * its licensees as provided above. However, if you add GPL Version 2 code + * and therefore, elected the GPL Version 2 license, then the option applies + * only if the new code is made subject to such option by the copyright + * holder. + */ + +package com.sun.faces.systest; + +import com.gargoylesoftware.htmlunit.html.HtmlPage; +import com.gargoylesoftware.htmlunit.html.HtmlOption; +import com.gargoylesoftware.htmlunit.html.HtmlSelect; +import com.gargoylesoftware.htmlunit.html.HtmlSubmitInput; + +import com.sun.faces.htmlunit.HtmlUnitFacesTestCase; +import java.util.ArrayList; +import java.util.List; +import junit.framework.Test; +import junit.framework.TestSuite; + + +public class Issue1943TestCase extends HtmlUnitFacesTestCase { + + public Issue1943TestCase(String name) { + super(name); + } + + /** + * Set up instance variables required by this test case. + */ + public void setUp() throws Exception { + super.setUp(); + } + + + /** + * Return the tests included in this test suite. + */ + public static Test suite() { + return (new TestSuite(Issue1943TestCase.class)); + } + + /** + * Tear down instance variables required by this test case. + */ + public void tearDown() { + super.tearDown(); + } + + + // ------------------------------------------------------------ Test Methods + + public void testBasicAppFunctionality() throws Exception { + + HtmlPage page = null; + + page = getPage("/faces/Index.xhtml"); + List selectList = getAllElementsOfGivenClass(page, + new ArrayList(), HtmlSelect.class); + HtmlSelect select = selectList.get(0); + List options = select.getOptions(); + select.setSelectedAttribute(options.get(0), true); + List buttonList = new ArrayList(1); + getAllElementsOfGivenClass(page, buttonList, HtmlSubmitInput.class); + HtmlSubmitInput submitButton = buttonList.get(0); + page = (HtmlPage)submitButton.click(); + assertTrue(page.asText().contains("valueChange Called")); + + page = getPage("/faces/Index_action.xhtml"); + buttonList = new ArrayList(2); + getAllElementsOfGivenClass(page, buttonList, HtmlSubmitInput.class); + HtmlSubmitInput submitButton1 = buttonList.get(0); + HtmlSubmitInput submitButton2 = buttonList.get(1); + page = (HtmlPage)submitButton1.click(); + assertTrue(page.asText().contains("removeGroup Called")); + page = (HtmlPage)submitButton2.click(); + assertTrue(!page.asText().contains("removeGroup Called")); + + } + +} + + Index: jsf-test/JAVASERVERFACES-1943/htmlunit/pom.xml =================================================================== --- jsf-test/JAVASERVERFACES-1943/htmlunit/pom.xml (revision 0) +++ jsf-test/JAVASERVERFACES-1943/htmlunit/pom.xml (revision 0) @@ -0,0 +1,114 @@ + + + + + 4.0.0 + com.sun.faces.test + i_jsf_1943_htmlunit + jar + i_jsf_1943_htmlunit + 2.0 + + + + + + + + + + + htmlunit + net.sourceforge.htmlunit + 2.4 + provided + + + junit + junit + 3.8.1 + provided + + + com.sun.faces.extensions + jsf-extensions-test-time + 2.0 + provided + + + + + + + + org.apache.maven.plugins + maven-compiler-plugin + 2.0.2 + + 1.6 + 1.6 + + + + maven-war-plugin + org.apache.maven.plugins + 2.1-alpha-2 + + false + + + + + i_jsf_1943_htmlunit + + + + + java.net + java.net + http://download.java.net/maven/2 + default + + + + Index: jsf-test/JAVASERVERFACES-1943/i_jsf_1943/src/main/java/vc/Bean.java =================================================================== --- jsf-test/JAVASERVERFACES-1943/i_jsf_1943/src/main/java/vc/Bean.java (revision 0) +++ jsf-test/JAVASERVERFACES-1943/i_jsf_1943/src/main/java/vc/Bean.java (revision 0) @@ -0,0 +1,46 @@ +package vc; + +import java.io.Serializable; + +import javax.faces.application.FacesMessage; +import javax.faces.bean.ManagedBean; +import javax.faces.bean.SessionScoped; +import javax.faces.context.FacesContext; +import javax.faces.event.AbortProcessingException; +import javax.faces.event.ValueChangeEvent; + +@ManagedBean +@SessionScoped +public class Bean implements Serializable { + + private static final long serialVersionUID = 1L; + + public Bean() { + } + + public void valueChange(ValueChangeEvent vce) throws AbortProcessingException { + System.err.println("VALUECHANGE CALLED!!!"); + FacesMessage fMsg = new FacesMessage(FacesMessage.SEVERITY_INFO, + "valueChange Called...", null); + FacesContext.getCurrentInstance().addMessage(null, fMsg); + + } + + private String groupToAdd = "select one"; + + public String getGroupToAdd() { return groupToAdd; } + + public void setGroupToAdd(String groupToAdd) { + this.groupToAdd = groupToAdd; + } + + public String removeGroup() { + System.err.println("REMOVEGROUP CALLED!!!"); + FacesMessage fMsg = new FacesMessage(FacesMessage.SEVERITY_INFO, + "removeGroup Called...", null); + FacesContext.getCurrentInstance().addMessage(null, fMsg); + return null; + } + + +} Index: jsf-test/JAVASERVERFACES-1943/i_jsf_1943/src/main/webapp/Index_action.xhtml =================================================================== --- jsf-test/JAVASERVERFACES-1943/i_jsf_1943/src/main/webapp/Index_action.xhtml (revision 0) +++ jsf-test/JAVASERVERFACES-1943/i_jsf_1943/src/main/webapp/Index_action.xhtml (revision 0) @@ -0,0 +1,35 @@ + + + + + + + + + + + + + + + + + + + + This text will not be displayed. + + + + +This text below will also not be displayed. + + + \ No newline at end of file Index: jsf-test/JAVASERVERFACES-1943/i_jsf_1943/src/main/webapp/Index.xhtml =================================================================== --- jsf-test/JAVASERVERFACES-1943/i_jsf_1943/src/main/webapp/Index.xhtml (revision 0) +++ jsf-test/JAVASERVERFACES-1943/i_jsf_1943/src/main/webapp/Index.xhtml (revision 0) @@ -0,0 +1,34 @@ + + + + + + + + + + + + + + + + + + + This text will not be displayed. + + + + +This text below will also not be displayed. + + + Index: jsf-test/JAVASERVERFACES-1943/i_jsf_1943/src/main/webapp/template.xhtml =================================================================== --- jsf-test/JAVASERVERFACES-1943/i_jsf_1943/src/main/webapp/template.xhtml (revision 0) +++ jsf-test/JAVASERVERFACES-1943/i_jsf_1943/src/main/webapp/template.xhtml (revision 0) @@ -0,0 +1,95 @@ + + + + + + + + + + + +
+ + + + + + + + + + + +
+ + + + + +
+ +
+
+ + + + + + + + + +
+ + + + + + + + + + + + + + +
+
+ +

+ + Unspecified title + + +

+
+
+ + + +
+ Unspecified body +
+
+
+ +
+
+ +
+
+
+ +
+ +
+ + Index: jsf-test/JAVASERVERFACES-1943/i_jsf_1943/src/main/webapp/WEB-INF/faces-config.xml =================================================================== --- jsf-test/JAVASERVERFACES-1943/i_jsf_1943/src/main/webapp/WEB-INF/faces-config.xml (revision 0) +++ jsf-test/JAVASERVERFACES-1943/i_jsf_1943/src/main/webapp/WEB-INF/faces-config.xml (revision 0) @@ -0,0 +1,8 @@ + + + + + Index: jsf-test/JAVASERVERFACES-1943/i_jsf_1943/src/main/webapp/WEB-INF/web.xml =================================================================== --- jsf-test/JAVASERVERFACES-1943/i_jsf_1943/src/main/webapp/WEB-INF/web.xml (revision 0) +++ jsf-test/JAVASERVERFACES-1943/i_jsf_1943/src/main/webapp/WEB-INF/web.xml (revision 0) @@ -0,0 +1,59 @@ + + + Test Frontend + + + + com.sun.faces.verifyObjects + true + + + com.sun.faces.validateXml + true + + + javax.faces.STATE_SAVING_METHOD + server + + + + javax.faces.PROJECT_STAGE + Development + + + + javax.faces.DEFAULT_SUFFIX + .xhtml + + + + + + + + + + + + + + javax.faces.FACELETS_SKIP_COMMENTS + true + + + + Faces Servlet + javax.faces.webapp.FacesServlet + 1 + + + Faces Servlet + /faces/* + + + + faces/Index.xhtml + + + Index: jsf-test/JAVASERVERFACES-1943/i_jsf_1943/src/main/webapp/resources/components/vccomponent.xhtml =================================================================== --- jsf-test/JAVASERVERFACES-1943/i_jsf_1943/src/main/webapp/resources/components/vccomponent.xhtml (revision 0) +++ jsf-test/JAVASERVERFACES-1943/i_jsf_1943/src/main/webapp/resources/components/vccomponent.xhtml (revision 0) @@ -0,0 +1,28 @@ + + + + + + + + + + + + + + + + + Index: jsf-test/JAVASERVERFACES-1943/i_jsf_1943/src/main/webapp/resources/components/outer.xhtml =================================================================== --- jsf-test/JAVASERVERFACES-1943/i_jsf_1943/src/main/webapp/resources/components/outer.xhtml (revision 0) +++ jsf-test/JAVASERVERFACES-1943/i_jsf_1943/src/main/webapp/resources/components/outer.xhtml (revision 0) @@ -0,0 +1,19 @@ + + + + + + + + () + + + \ No newline at end of file Index: jsf-test/JAVASERVERFACES-1943/i_jsf_1943/src/main/webapp/resources/components/component1.xhtml =================================================================== --- jsf-test/JAVASERVERFACES-1943/i_jsf_1943/src/main/webapp/resources/components/component1.xhtml (revision 0) +++ jsf-test/JAVASERVERFACES-1943/i_jsf_1943/src/main/webapp/resources/components/component1.xhtml (revision 0) @@ -0,0 +1,23 @@ + + + + + + + + + + + + + + + \ No newline at end of file Index: jsf-test/JAVASERVERFACES-1943/i_jsf_1943/pom.xml =================================================================== --- jsf-test/JAVASERVERFACES-1943/i_jsf_1943/pom.xml (revision 0) +++ jsf-test/JAVASERVERFACES-1943/i_jsf_1943/pom.xml (revision 0) @@ -0,0 +1,117 @@ + + + + + 4.0.0 + + com.sun.faces.regression + i_jsf_1943 + 1.0 + war + + i_jsf_1943 + + + maven-compiler-plugin + + 1.6 + 1.6 + + + + maven-dependency-plugin + + + install + + + + + + + + + + + org.jvnet.wagon-svn + wagon-svn + 1.12 + + + + + + javax.faces + jsf-api + 2.1 + provided + + + javax + javaee-api + 6.0 + provided + + + + + + + false + java.net-maven2-repository + java-net:/maven2-repository~svn/trunk/repository/ + + + + + + java.net + java.net + http://download.java.net/maven/2 + default + + + + + Index: jsf-test/JAVASERVERFACES-1943/build.xml =================================================================== --- jsf-test/JAVASERVERFACES-1943/build.xml (revision 0) +++ jsf-test/JAVASERVERFACES-1943/build.xml (revision 0) @@ -0,0 +1,100 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Index: jsf-test/build.xml =================================================================== --- jsf-test/build.xml (revision 9035) +++ jsf-test/build.xml (working copy) @@ -64,7 +64,7 @@ JAVASERVERFACES-1856,JAVASERVERFACES-1655,JAVASERVERFACES-1542" /> + JAVASERVERFACES-1958,JAVASERVERFACES-2038,JAVASERVERFACES-2025,JAVASERVERFACES-1637,JAVASERVERFACES-2052,JAVASERVERFACES_SPEC_PUBLIC-997,JAVASERVERFACES-1943" /> SECTION: New Files ---------------------------- SEE ATTACHMENTS