on 02-10-2005 2:41 PM
Hi,
I have created an iView with a Table View in it. I've also created an onCellClick event successfully raises the event in my Java Code.
How in my code do I get the value of cell that has been clicked?
I've read through the documentation but can't find a reference to how this particular operation is done?
Thanks
Hi KR,
this is part of the documentation!
// CALLED IF THE USER CLICKED IN ONE CELL OF THE TABLEVIEW
public void onCellClick(Event event) {
// get the event
TableCellClickEvent tcce = (TableCellClickEvent) event; // get the event
// get the coordinates for the clicked cell and store it in the bean
myBean.setClickedCell(tcce.getVisibleRowIndex(), tcce.getVisibleColIndex());
// calculate the position in the table. The values returned above are "absolut" to the visible
// cells. The first visible row is available in the bean. So the value of the first
// visible row is added.
int realSelectedRow = tcce.getVisibleRowIndex() + Integer.parseInt(myBean.getVisibleRow()) - 1;
int realSelectedColumn = tcce.getVisibleColIndex();
// Store the cell position in the bean. This information is displayed as textView under the tableView in the JSP
myBean.setClickedCellData(myBean.getModel().getValueAt(realSelectedRow, realSelectedColumn).toString());
}
But you're not the only one who does not find it See https://forums.sdn.sap.com/thread.jspa?threadID=11304
Hope it helps
Detlev
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Many Thanks,
That works great!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.