Hi All,
I am using Facelets and
JSF in my application.
In one of the page, am using t:dataTable to iterate over the collection. I see that my getter method was invoked 2 times since am referring it 2 times in my facelets page.
I would like to know how do I cache the collection in my facelets page so that my getter method will get invoked only one time.
I did like this in my facelets page but still my getter method invokes 2 times...
<ui:param name="var" value="#{myBean.myMethodName}"/>
and am referring the value "var" in the datatable.
Please advice what I am doing wrong or please provide how to cache the value in the Facelets so that my backing or managed bean method will be called only one time.
The reason why my method is getting referenced 2 times because am rendering the datatable only when the collection is not empty....
<t:dataTable
id="my-data-table"
forceId="true"
var="data"
value="#{myBean.myCollectionVariable}"
rendered="#{!empty myBean.myCollectionVariable}">
Thanks,
Kumar Saravanan
[ April 03, 2007: Message edited by: Kumar Saravanan ]