I want to do some opertaions in the row of my JSF datatable, and for that i need and id of row. But when i see html generated through firebug. I notice that id is getting generated only for JSF components not of tr and td. Is there someway by which i can define the id of row(tr) Here is my code
<h:datatable value = "#{bean.list}" var = "row">
<h:column>
#{row.name}
</h:column>
<h:column>
#{row.address}
</h:column>
<h:column>
#{row.phone no}
</h:column>
<h:column>
<h:selectBooleanCheckbox id="checkbox" value="#{row.sportsStudent}" />
</h:column>
</h:datatable>
There is a button below my datatable which says "Show only sports student" and my list should show only sports student and caption will change to "Show all students" . now all students should be displayed. So i was thinking if i have id of tr . I can just hide/show that row using jquery. So can i do that ?
Thanks in advance.
Tarun Madaan
You have several options. I can propose 2 of them:
sport
and ordinary
for others. And then you can hide/show all rows, which contains elements with ordinary
class.