I have a JSF data table that conditionally displays each element based on the logical property of the element as follows:
<h:dataTable value='#{sessionBean.items}' var='item'> <h:column rendered='#{item.visible}'> <h:outputText value='#{item.description}'/> </h:column> </h:dataTable>
My problem is that the rendered attribute doesn't seem to apply to the visible property in my element at all. I sent a trace message to getter for the property and I can confirm that getter is not called at all. However, what really puzzles me is this:
<h:dataTable value='#{sessionBean.items}' var='item'> <h:column rendered='true'> <h:outputText value='visible = #{item.visible}'/> <h:outputText value='#{item.description}'/> </h:column> </h:dataTable>
That is, in this case all the elements are displayed, and for each result the text "visible = true" or "visible = false" is successfully displayed. It only in the rendered column attribute rendered not work.
Does anyone know what can cause this behavior, and what should I do to fix it?
source share