I am a new GWTP user and I am not sure how to create a table in GWTP. I know how to make one in GWT.
// Create a CellTable.
CellTable<Contact> table = new CellTable<Contact>();
// Create name column.
TextColumn<Contact> nameColumn = new TextColumn<Contact>() {
@Override
public String getValue(Contact contact) {
return contact.name;
}
};
But This doesn't seem to work in GWTP. Can someone please help me with getting the values on a button press in a GWTP program.
I'm aware you asked this question over a week ago but you may still be stuck on it so here goes. You just have to make sure you put the right bits of logic in the
PresenterandViewrespectively.It's no different from MVP (Model-View-Presenter) without GWTP in principle:
Your
Presenterhas the job of getting the data to fill theCellTable, and passing it to theView:Your
Viewhas the job of initially setting up theCellTableand itsColumns, as well as receiving the data from thePresenter. Here I show aTextColumnand aColumnusing aButtonCell:Then in your UiBinder: