My code here iterates over the columns for each row, and the rendered attribute rendered computed for each iteration, testRule .
<p:dataTable ...> <p:column ...> ... </p:column> <p:column rendered="#{managedBean.testRule('rules.canDoActions')}"> <h:commandButton ...> <h:commandButton ...> </p:column> </p:dataTable>
To get better performance, I was interested in setting the result to a variable, but I donβt know how ... It will be something like this:
<?:??? var="canDoActions" value="#{managedBean.testRule('rules.canDoActions')}"> <p:dataTable ...> <p:column ...> ... </p:column> <p:column rendered="#{canDoActions}"> <!-- Action buttons --> <h:commandButton ...> <h:commandButton ...> </p:column> </p:dataTable>
Also, I'm not allowed to use the Core Tag Library, which means that <c:set ../> out of the question.
In this area, how can I set a variable? Or, if this is not possible, what do you propose to solve?
source share