If I define a custom cell extending AbstractCell how to I use my custom cell in a CellTable?
My custom cell is composed of two Labels and an Image and is populated by a Contact object that holds the values for the labels and image.
How do I define a Column that references my custom cell to add to my CellTable? Snippets from the code:
The abstract cell widget:
public class ContactCell extends AbstractCell<String> { ... }
The data class:
public class Contact {
String first;
String last;
String photo_url;
}
The code building the CellTable:
CellTable<Contact> results = getView().getContactsTable();
Column<Contact, SOMECLASSHERE> col
= new Column<Contact, SOMECLASSHERE>(new SOMECLASSHERE()) {
@Override
public SOMECLASSHERE getValue(Contact object) {
// TODO Auto-generated method stub
return WHAT?;
}
};
}
Is this a correct approach? And if so, how to I use my abstract cell?