dev@javaserverfaces.java.net

[REVIEW] Fix for issue 274

From: Ryan Lubke <Ryan.Lubke_at_Sun.COM>
Date: Mon, 20 Mar 2006 11:07:21 -0800

Proposed fix for issue 274
(https://javaserverfaces.dev.java.net/issues/show_bug.cgi?id=274)


Fix for issue 274.


SECTION: Modified Files
----------------------------
M jsf-api/src/javax/faces/component/UIComponentBase.java
 - processRestoreState() if component is transient, continue.

M jsf-ri/systest/build-tests.xml
A jsf-ri/systest/web/ProcessSaveRestoreStateTest.jsp
 - test for this issue


SECTION: Diffs
----------------------------
Index: jsf-api/src/javax/faces/component/UIComponentBase.java
===================================================================
RCS file: /cvs/javaserverfaces-sources/jsf-api/src/javax/faces/component/UIComponentBase.java,v
retrieving revision 1.131
diff -u -r1.131 UIComponentBase.java
--- jsf-api/src/javax/faces/component/UIComponentBase.java 8 Mar 2006 19:06:36 -0000 1.131
+++ jsf-api/src/javax/faces/component/UIComponentBase.java 20 Mar 2006 19:04:29 -0000
@@ -1153,10 +1153,13 @@
             Iterator kids = getChildren().iterator();
             while (kids.hasNext()) {
                 UIComponent kid = (UIComponent) kids.next();
- Object currentState = childState[i++];
- if (currentState == null) {
- continue;
- }
+ if (kid.isTransient()) {
+ continue;
+ }
+ Object currentState = childState[i++];
+ if (currentState == null) {
+ continue;
+ }
                 kid.processRestoreState(context, currentState);
             }
         }
 
Index: jsf-ri/systest/build-tests.xml
===================================================================
RCS file: /cvs/javaserverfaces-sources/jsf-ri/systest/build-tests.xml,v
retrieving revision 1.107
diff -u -r1.107 build-tests.xml
--- jsf-ri/systest/build-tests.xml 20 Mar 2006 18:21:38 -0000 1.107
+++ jsf-ri/systest/build-tests.xml 20 Mar 2006 19:04:30 -0000
@@ -670,6 +670,10 @@
               request="${context.path}/faces/component.jsp"
               outContent="/component.jsp PASSED"/>
         
+ <jsf.tester
+ request="${context.path}/faces/ProcessSaveRestoreStateTest.jsp"
+ status="200"/>
+
         <jsf.junit context-path="${context.path}"
                    classpath-refid="html.classpath"
                    test-results-dir="${impl.test.results.dir}">


SECTION: New Files
----------------------------
SEE ATTACHMENTS