Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Invalid
-
2.2.10-SNAPSHOT
-
None
-
None
-
None
Description
Accessing an attribute from with in a composite component that is contained in a forEach tag causes a null pointer exception if partial state saving is enabled.
As the example is too complex to be shown within this report an example project can be found at https://github.com/jgrimmwsb/faces-foreach-partial-state-saving.
Steps to reproduce the error:
- Ensure the selected myfaces.version in the pom.xml is one of 2.2.10-SNAPSHOT.
- Ensure that javax.faces.PARTIAL_STATE_SAVING is set to true in the web.xml.
- Start the application and open the respective website.
- The log will show an exception like shown below:
Stacktrace
java.lang.NullPointerException at org.apache.myfaces.view.facelets.el.FaceletStateValueExpression.getWrapped(FaceletStateValueExpression.java:75) at org.apache.myfaces.view.facelets.el.FaceletStateValueExpression.getValue(FaceletStateValueExpression.java:107) at org.apache.el.parser.AstIdentifier.getValue(AstIdentifier.java:74) at org.apache.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:184) at org.apache.myfaces.view.facelets.el.ContextAwareTagValueExpression.getValue(ContextAwareTagValueExpression.java:96) at javax.faces.component._ComponentAttributesMap.get(_ComponentAttributesMap.java:331) at example.Test.getVariables(Test.java:161) at example.Test.captureOriginalVars(Test.java:133) at example.Test.visitTree(Test.java:77) at javax.faces.component.UIForm.visitTree(UIForm.java:345) at javax.faces.component.UIComponent.visitTree(UIComponent.java:1047) at javax.faces.component.UIComponentBase.visitTree(UIComponentBase.java:1191)
With MyFaces 2.2.7 or Mojarra the error did not occur. MyFaces 2.2.10-SNAPSHOT with javax.faces.PARTIAL_STATE_SAVING is set to false works without error.
Attachments
Attachments
Issue Links
- relates to
-
MYFACES-3964 c:foreach not working when using custom equals or non serializable objects
- Closed