use of com.codename1.rad.nodes.TableColumns in project CodeRAD by shannah.
the class TablePropertyView method update.
@Override
public void update() {
super.update();
EntityListTableModel model = (EntityListTableModel) getComponent().getModel();
EntityList list = model.getEntityList();
EntityList ePropertyVal = getPropertyAsEntityList();
if (ePropertyVal == list) {
return;
}
TableColumns columns = (TableColumns) getField().findAttribute(TableColumns.class);
if (columns == null) {
throw new IllegalStateException("Cannot create TablePropertyView for field " + getField() + " because the field does not define any columns. Add a ColumnsNode attribute to the field.");
}
EntityListTableModel newModel = new EntityListTableModel(list.getRowType(), ePropertyVal, columns);
getComponent().setModel(newModel);
}
Aggregations