use of org.dominokit.domino.ui.datatable.DataTable in project nalu-examples by NaluKit.
the class ListComponent method render.
@Override
public void render() {
TableConfig<Person> tableConfig = new TableConfig<>();
tableConfig.addColumn(ColumnConfig.<Person>create("name", "Name").setCellRenderer(cell -> a().textContent(cell.getTableRow().getRecord().getName() + ", " + cell.getTableRow().getRecord().getFirstName()).on(EventType.click, e -> getController().doUpdate(cell.getTableRow().getRecord())).element())).addColumn(ColumnConfig.<Person>create("street", "Street").setCellRenderer(cell -> new Text(cell.getTableRow().getRecord().getAddress().getStreet()))).addColumn(ColumnConfig.<Person>create("zip", "ZIP").textAlign("right").setCellRenderer(cell -> new Text(cell.getTableRow().getRecord().getAddress().getZip()))).addColumn(ColumnConfig.<Person>create("street", "Street").setCellRenderer(cell -> new Text(cell.getTableRow().getRecord().getAddress().getStreet()))).addColumn(ColumnConfig.<Person>create("city", "City").setCellRenderer(cell -> new Text(cell.getTableRow().getRecord().getAddress().getCity())));
this.store = new LocalListDataStore<>();
this.table = new DataTable<>(tableConfig, store);
initElement(Card.create("SEARCH RESULTS").appendChild(Row.create().appendChild(Column.span12().appendChild(this.table))).element());
}
use of org.dominokit.domino.ui.datatable.DataTable in project nalu-examples by NaluKit.
the class ListComponent method render.
@Override
public void render() {
TableConfig<Person> tableConfig = new TableConfig<>();
tableConfig.addColumn(ColumnConfig.<Person>create("name", "Name").setCellRenderer(cell -> a().textContent(cell.getTableRow().getRecord().getName() + ", " + cell.getTableRow().getRecord().getFirstName()).on(EventType.click, e -> getController().doUpdate(cell.getTableRow().getRecord())).element())).addColumn(ColumnConfig.<Person>create("street", "Street").setCellRenderer(cell -> new Text(cell.getTableRow().getRecord().getAddress().getStreet()))).addColumn(ColumnConfig.<Person>create("zip", "ZIP").textAlign("right").setCellRenderer(cell -> new Text(cell.getTableRow().getRecord().getAddress().getZip()))).addColumn(ColumnConfig.<Person>create("street", "Street").setCellRenderer(cell -> new Text(cell.getTableRow().getRecord().getAddress().getStreet()))).addColumn(ColumnConfig.<Person>create("city", "City").setCellRenderer(cell -> new Text(cell.getTableRow().getRecord().getAddress().getCity())));
this.store = new LocalListDataStore<>();
this.table = new DataTable<>(tableConfig, store);
initElement(Card.create("SEARCH RESULTS").appendChild(Row.create().appendChild(Column.span12().appendChild(this.table))).element());
}
use of org.dominokit.domino.ui.datatable.DataTable in project nalu-examples by NaluKit.
the class ListComponent method render.
@Override
public void render() {
TableConfig<Person> tableConfig = new TableConfig<>();
tableConfig.addColumn(ColumnConfig.<Person>create("name", "Name").setCellRenderer(cell -> a().textContent(cell.getTableRow().getRecord().getName() + ", " + cell.getTableRow().getRecord().getFirstName()).on(EventType.click, e -> getController().doUpdate(cell.getTableRow().getRecord())).asElement())).addColumn(ColumnConfig.<Person>create("street", "Street").setCellRenderer(cell -> new Text(cell.getTableRow().getRecord().getAddress().getStreet()))).addColumn(ColumnConfig.<Person>create("zip", "ZIP").textAlign("right").setCellRenderer(cell -> new Text(cell.getTableRow().getRecord().getAddress().getZip()))).addColumn(ColumnConfig.<Person>create("street", "Street").setCellRenderer(cell -> new Text(cell.getTableRow().getRecord().getAddress().getStreet()))).addColumn(ColumnConfig.<Person>create("city", "City").setCellRenderer(cell -> new Text(cell.getTableRow().getRecord().getAddress().getCity())));
this.store = new LocalListDataStore<>();
this.table = new DataTable<>(tableConfig, store);
initElement(Card.create("SEARCH RESULTS").appendChild(Row.create().appendChild(Column.span12().appendChild(this.table))).asElement());
}
use of org.dominokit.domino.ui.datatable.DataTable in project nalu-examples by NaluKit.
the class ListComponent method render.
@Override
public void render() {
TableConfig<Person> tableConfig = new TableConfig<>();
tableConfig.addColumn(ColumnConfig.<Person>create("name", "Name").setCellRenderer(cell -> a().textContent(cell.getTableRow().getRecord().getName() + ", " + cell.getTableRow().getRecord().getFirstName()).on(EventType.click, e -> getController().doUpdate(cell.getTableRow().getRecord())).element())).addColumn(ColumnConfig.<Person>create("street", "Street").setCellRenderer(cell -> new Text(cell.getTableRow().getRecord().getAddress().getStreet()))).addColumn(ColumnConfig.<Person>create("zip", "ZIP").textAlign("right").setCellRenderer(cell -> new Text(cell.getTableRow().getRecord().getAddress().getZip()))).addColumn(ColumnConfig.<Person>create("street", "Street").setCellRenderer(cell -> new Text(cell.getTableRow().getRecord().getAddress().getStreet()))).addColumn(ColumnConfig.<Person>create("city", "City").setCellRenderer(cell -> new Text(cell.getTableRow().getRecord().getAddress().getCity())));
this.store = new LocalListDataStore<>();
this.table = new DataTable<>(tableConfig, store);
initElement(Card.create("SEARCH RESULTS").appendChild(Row.create().appendChild(Column.span12().appendChild(this.table))).element());
}
use of org.dominokit.domino.ui.datatable.DataTable in project nalu-examples by NaluKit.
the class ListComponent method render.
@Override
public void render() {
TableConfig<Person> tableConfig = new TableConfig<>();
tableConfig.addColumn(ColumnConfig.<Person>create("name", "Name").setCellRenderer(cell -> a().textContent(cell.getTableRow().getRecord().getName() + ", " + cell.getTableRow().getRecord().getFirstName()).on(EventType.click, e -> getController().doUpdate(cell.getTableRow().getRecord())).element())).addColumn(ColumnConfig.<Person>create("street", "Street").setCellRenderer(cell -> new Text(cell.getTableRow().getRecord().getAddress().getStreet()))).addColumn(ColumnConfig.<Person>create("zip", "ZIP").textAlign("right").setCellRenderer(cell -> new Text(cell.getTableRow().getRecord().getAddress().getZip()))).addColumn(ColumnConfig.<Person>create("street", "Street").setCellRenderer(cell -> new Text(cell.getTableRow().getRecord().getAddress().getStreet()))).addColumn(ColumnConfig.<Person>create("city", "City").setCellRenderer(cell -> new Text(cell.getTableRow().getRecord().getAddress().getCity())));
this.store = new LocalListDataStore<>();
this.table = new DataTable<>(tableConfig, store);
initElement(Card.create("SEARCH RESULTS").appendChild(Row.create().appendChild(Column.span12().appendChild(this.table))).element());
}
Aggregations