Is EL-parsing of children to elements with rendered="false" really supposed to be evaluated? This is causing me alot of trouble with null pointer exceptions and similar. Looking at the following example:
<p:tab title="#{userCompetenceController.getTreeName(3)}" rendered="#{!empty userCompetenceController.getTreeName(3)}">
<xdin:competenceTable id="competenceBox3"
profile="#{userCompetenceController.selectedProfile}"
tree="#{userCompetenceController.getCompetenceTree(3)}"
maxHeight="500px"/>
</p:tab>
The main issue (besides performance) is that xdin:competenceTable
does not support a null tree
-attribute. getTreeName(int index)
returns null in this case, and is followed by a call to getCompetenceTree(3)
which returns null, even though its parent (p:tab
) has rendered="false"
In short: xdin:competenceTable
is parsed by EL even though it's parent has rendered="false"
. Why?
ValueExpression
then the expression may be evaluated at tree creation time. – Daughtryjavax.el.ValueExpression
- this means they can take deferred expressions. – Daughtry