Edit: never mind!
I'm in the process of switching my project over from JSF 1.2 with Facelets to JSF 2 with Facelets. It looks like, in JSF 2, EL expressions in components that are not rendered are evaluated. This did not appear to be the case in JSF 1.2. So you get problems like:
<h:panelGroup rendered="#{not empty myBean.myPojo}">
<h:outputText value="#{myBean.myPojo.pojoProperty}" />
</h:panelGroup>
causing a NullPointerException if myBean.myPojo is null, when it didn't in the JSF 1.2 version of my project. An alternative is using c:if for th开发者_JAVA技巧ese cases (instead of h:panelGroup rendered="..."), but that comes with its own problems. Could there be something else I'm doing wrong? Is there some configuration for this? Thanks!
If that's all that's going on, then this seems like a bug in the underlying EL implementation. I suggest checking if there is a new version, if this issue has previously been reported, and if not - report it! :)
精彩评论