Search in sources :

Example 1 with SimpleBeanBoundTableModel

use of com.github.bordertech.wcomponents.SimpleBeanBoundTableModel in project wcomponents by BorderTech.

the class TableLoadPerformance method setupWTable.

/**
 * Setup WTable.
 */
private void setupWTable() {
    WTextField col1 = new WTextField();
    col1.setIdName("my1");
    col1.setReadOnly(true);
    WTextField col2 = new WTextField();
    col2.setIdName("my2");
    col2.setReadOnly(true);
    WDateField col3 = new WDateField();
    col3.setIdName("my3");
    col3.setReadOnly(true);
    table.addColumn(new WTableColumn("COL1", col1));
    table.addColumn(new WTableColumn("COL2", col2));
    table.addColumn(new WTableColumn("COL3", col3));
    table.setExpandMode(WTable.ExpandMode.CLIENT);
    table.setIdName("wt");
    LevelDetails level = new LevelDetails("documents", TravelDocPanel.class, true);
    SimpleBeanBoundTableModel model = new SimpleBeanBoundTableModel(new String[] { "firstName", "lastName", "dateOfBirth" }, level);
    table.setTableModel(model);
}
Also used : WTableColumn(com.github.bordertech.wcomponents.WTableColumn) SimpleBeanBoundTableModel(com.github.bordertech.wcomponents.SimpleBeanBoundTableModel) WDateField(com.github.bordertech.wcomponents.WDateField) WTextField(com.github.bordertech.wcomponents.WTextField) LevelDetails(com.github.bordertech.wcomponents.SimpleBeanBoundTableModel.LevelDetails)

Aggregations

SimpleBeanBoundTableModel (com.github.bordertech.wcomponents.SimpleBeanBoundTableModel)1 LevelDetails (com.github.bordertech.wcomponents.SimpleBeanBoundTableModel.LevelDetails)1 WDateField (com.github.bordertech.wcomponents.WDateField)1 WTableColumn (com.github.bordertech.wcomponents.WTableColumn)1 WTextField (com.github.bordertech.wcomponents.WTextField)1