Hi!
There are some good examples in EP(User Interface Development->HTMLB->Additional Examples using Models->tableView).
I think you could do something like that:
public void onMyOnRowSelection(Event event) throws PageException { TableRowSelectionEvent r = (TableRowSelectionEvent)event; int realSelectedRow = r.getVisibleRowIndex() + Integer.parseInt(myBean.getVisibleRow()) - 1; String valueForCol1 = myBean.getModel().getValueAt(realSelectedRow, 1).toString(); }
"myBean" is your TableViewBean. There you can set the visible at the NavigationEvents... you can see this in the examples...
Best Regards,
Christian
Hello,
I implemented this a long time ago so I'll do my best:
TableView table = (TableView) this.getComponentByName("backenTV"); int ns = 0; for (int i = 1; i <= table.getRowCount(); i++) { if ((table.isRowSelected(i))) { ns = i; } }
After this You can read out the line of the TableViewModel an access the values.
Good luck and try it.
Walter
Hi,
you have to define the method, which will be started, when the event occured:
myTableView.setOnRowSelection("onRowSelection");
In the Main-Class you have to implement this method like:
public void onRowSelection (Event event) {
TableView table = (TableView) this.getComponentByName("myTableView");
}
Regards,
Gerhard
Add a comment