In plain html, when I want to point-out a table row, I just write:
<tr onmouseover="javaScript_(jQuery)_Code_To_Add_Pointed_Out_Class"
onmouseout="javaScript_(jQuery)_Code_To_Remove_Pointed_Out_Class">
...
</tr>
Is there a way to do this in a <h:dataTable>
for JSF?
Something with Primefaces or what else?
In plain html, when I want to point-out a table row, I just write:
<tr onmouseover="javaScript_(jQuery)_Code_To_Add_Pointed_Out_Class"
onmouseout="javaScript_(jQuery)_Code_To_Remove_Pointed_Out_Class">
...
</tr>
Is there a way to do this in a <h:dataTable>
for JSF?
Something with Primefaces or what else?
- Maybe a duplicate of this question: stackoverflow./questions/5055384/… – Robin Commented Sep 3, 2011 at 22:02
1 Answer
Reset to default 8Styling is to be done by CSS. E.g.
<h:dataTable styleClass="myTableClass">
...
</h:dataTable>
with
.myTableClass>tbody>tr {
background: pink;
}
.myTableClass>tbody>tr:hover {
background: purple;
}
JavaScript hacks like in your question example are only necessary for ancient browsers which are already deprecated for long now.