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.

[355 byte] By [javamnr948a] at [2007-11-27 11:55:49]
# 1

You can find here an article how to use datatables: http://balusc.xs4all.nl/srv/dev-jep-dat.html

BalusCa at 2007-7-29 19:04:07 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 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

Roshu_Roshua at 2007-7-29 19:04:07 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...