CellList<Device> cellList = new CellList<Device>(new ItemCell());
where:
static class ItemCell extends AbstractCell<Device> {
@Override
public void render(Context context, Device device, SafeHtmlBuilder builder) {
if(device == null) {
return;
}
builder.appendHtmlConstant("<div>device.getId()</div>");
builder.appendHtmlConstant("<div>device.getName()</div>");
}
}
And now, I want to make an ‘Edit’ button, when I’ll press on it – I want to see editable selected item. How can I do it? Please answer, who knows.
I followed the simple old way of doing this.
I used a cell list and a form attached to it. Every time you click on a row, row’s data is loaded to the form. You can delete or edit the selected row via this form now.