posted 17 years ago
I want to conditionally display a h:commandLink in a dataTable row, based on a column in the DB for that row.
So for example, say the dataTable consists of three rows:
Col1, Col2, Col3
Hi, 0, NO
Hello, 1, NO
Hi, 0, YES
<h:commandLink styleClass="columnCommandLink" id="link25" action="#{dosomething}" rendered="#{var.col3IsYES}" >
<h:outputText value=" [Delete]"></h:outputText>
</h:commandLink>
I only want the delete link to show for the third element, so the output would look like this
Col1, Col2, Col3
Hi 0 NO [update]
Hello 1 NO [update]
Hi 0 YES [update] | [delete]
I have tried the above method - it doesnt work - it will just display or not display delete for ALL rows.
Any ideas?
Thanks
Ayan