The following is an example of cell construction for CellListGWT:
private static class Contact {
private static int nextId = 0;
private final int id;
private String name;
public Contact(String name) {
nextId++;
this.id = nextId;
this.name = name;
}
}
private static class ContactCell extends AbstractCell<Contact> {
@Override
public void render(Context context, Contact value, SafeHtmlBuilder sb) {
if (value != null) {
sb.appendEscaped(value.name);
}
}
}
If I have a complex cell, just returning a safe HTML string from render()becomes tedious. Is there a way to use UiBinder for this, or is something better than manually creating an HTML string?
source
share