Using Data Model

Top  Previous  Next

Table Data Model stores data that will be shown in the cells.

For example if in the column model the column class was defined as java.lang.Integer then values for that column must be created as like new Integer(12);

 

See the testing application for the sample creating Data Model.

 

Each table cell may be editable.

 

table.getTableDataModel().setCellEditable(1,1,true);

 

In this case you can set editor class for each column.

You can set it into the table using the column object.

 

column1.setCellEditor("com.softaspects.jsf.renderer.table.cell.object.ObjectListBoxTableCellEditor");

 

Click here to see TableDataModelBean example

 

Click here to see using of tags to set Data Model example