Hi,
I am using facelets and
JSF. I would like to know how to catch the value in UI (I mean in UI Facelets tag) and reference that variable from JSF code.
Here is my problem, I am having a getter method which executes a database query and return the collection of results.
I referred this getter method (getValue) in my datatable like this:
<h:dataTable var="items" value="#{myBean.value}" rendered="#{not empty myBean.value}">
</h:dataTable>
In the above case, since I referred the "value" property 2 times, my getter method in Backing Bean is getting invoked 2 times (getValue).
I would like to avoid this repeated execution by execute the call and cache the result in faceletes tag and I can refer the variable from h:dataTable tag.
Can anyone suggest or advice me how to get catch the value in Facelets?
I tried in ui:param tag and it doesnt work. I tried c:set and the bean is not at all getting invoked.
Thanks
Kumar