In my application I use a rich:subTable
inside a rich:dataTable
. I want to get the index of the rich:开发者_开发知识库subTable
inside the rich:dataTable
when I click on a row of the rich:subTable
. Is there any way to achieve this?
you can use jquery to get to the datatable row and then find the row index, something like this
var rowIndex = $(this).closest('tr').prevAll().length;
or
var row = $(this).parent().parent(); var rowIndex = $(row[0].rowIndex);
I have used the another approach that means using HtmlSubTable class of the subtable.
精彩评论