It doesn't iterate over the children <h:column /> tags but it does call
ValueBinding.setValue() on an important attribute that in my opinion it
should ignore when rendered=false: <t:dataTable
value="#{backingBean.theList}" >.
If you have a table defined as follows, even with rendered="false", it
still calls ValueBinding.setValue() on the value attribute of the
dataTable. In the simple example I made, it is just a List of
hard-coded objects. But normally that is a List populated from a
database query. I shouldn't be making db calls if I am not going to show
the resultant data. But the only way to do a lazy-loading of this
property is with the hack of binding the component and checking the
isRendered() flag in your getter method.
<t:dataTable value="#{schedule.theList}" var="entry" rendered="false">
<t:column>#{entry.value}</t:column>
</t:dataTable>
Matthias Wessendorf wrote:
I think that div doesn't care about it's children
dataTable for instance does.
-Matthias
On 7/11/06, Matt Hughes <[EMAIL PROTECTED]> wrote:
If you have the following code:
<t:div rendered="false">
<h:outputText value="#{backingBean.someGetterMethod}" />
</t:div>
Should getSomeGetterMethod() be invoked? My initial thought was if the
parent's rendered attribute was false, the value binding expression
*shouldn't* be evaluated. Using MyFaces 1.1.1 and Facelets 1.10, it is
being evaluated.
Ideally if rendered is false, than I don't want all the ValueBinding
expressions underneath that tag to be evaluated.
Any thoughts?