In my example I have a list of invoices and I want to be able to send an email reminder to that person by clicking a cell on the table. Can’t quite figure out how to do this.
I managed to get it to generate a button in the cell but can’t figure out how to add an action.
Hope this makes sense.
I think i am getting somewhere:
public Component cellGenerator(Invoice entity) {
WebButton webButton = new WebButton();
webButton.setCaption("Email Invoice");
webButton.setAction(doSomething(entity));
return webButton;
}
I am wondering how to put an action to each button that remembers what invoice the button is sending.
Inject Table with Entity type and use createComponent with class of a Component. Also, BaseAction has a couple of convenient methods, for instance with lambda handler.