public TableViewExample() {
model = this.createNewTable(model);
/* getting column name and define event handler for the column */
TableColumn column = model.getColumn("1stColumn");
/* Now define event handler name/method - the method
has to be declared in the DynPage */
column.setOnCellClick("1stColumn", "onFirstColumnClick");
/* Do the same for the other 2 columns in the model */
column = model.getColumn("2ndColumn");
column.setOnCellClick("2ndColumn", "onSecondColumnClick");
column = model.getColumn("3rdColumn");
column.setOnCellClick("3rdColumn", "onThirdColumnClick");
}
|