[
https://issues.apache.org/jira/browse/MYFACES-3033?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12991337#comment-12991337
]
Martin Kočí commented on MYFACES-3033:
--------------------------------------
Please notice that this issue is not related to new VisitHint.SKIP_ITERATION
only. Originally I found this problem with RichFaces - their dataTable does
this optimalization now with simple if (isRestoreViewPhase) { visit children
without iteration}
Please see https://issues.jboss.org/browse/RF-10154 for details.
> Improve DebugPhaseListener for UIData and SKIP_ITERATION
> --------------------------------------------------------
>
> Key: MYFACES-3033
> URL: https://issues.apache.org/jira/browse/MYFACES-3033
> Project: MyFaces Core
> Issue Type: Improvement
> Components: General
> Affects Versions: 2.1.0
> Reporter: Martin Kočí
>
> <h:dataTable var="row" >
> <h:column>
> <h:outputText rendered="#{bean.isRendered(row)}"
> There is new VisitHint.SKIP_ITERATION in JSF 2.1. If that hint is used UIData
> iterate over children in "flat" manner and therefore no row is available -
> bean.isRendered(row) obtains null as parameter and NPE can happen. One
> problem in this situation is a component tree walk before RESTORE_VIEW from
> DebugPhaseListener:
> java.lang.NullPointerException
> foo.bazz.bean.isRendered
> ...
> at
> org.apache.myfaces.view.facelets.el.TagValueExpression.getValue(TagValueExpression.java:85)
> at javax.faces.component._DeltaStateHelper.eval(_DeltaStateHelper.java:260)
> at javax.faces.component.UIComponentBase.isRendered
> ...
> at javax.faces.component.UIComponentBase.visitTree(UIComponentBase.java:991)
> at
> org.apache.myfaces.view.facelets.tag.ui.DebugPhaseListener._doTreeVisit(DebugPhaseListener.java:310)
> at
> org.apache.myfaces.view.facelets.tag.ui.DebugPhaseListener.afterPhase(DebugPhaseListener.java:286)
--
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira