how to select one row from the datatable
hi,
I have a data table which displays the employee list .the table contains 4 columns which represents the employee code,address,status like that.
when we click on particular row,the row must be selected and the total details of the employee will be displayed on the same page below the datatable.
how to write the code for this.
# 2
Hi
Jsp Page
<h:dataTable value="#{bean.list}" var="role" binding="#{bean.table}">
binding- attribute need to include in dataTable tag
Bean
1> private UIData _table; as variable
2>Getter and setter Methods
public void setTable(UIData table) {
_table = table;
}
public UIData getTable() {
return _table;
}
3> Object objectName=(Object)_table.getRowData();; -- include the code in the method u wanna fetch the row data.
It'll work