I have a datatable which displays various entities based on a List<>. When I select a cell for editing I want to be able to also get the entity somehow in order to update it.
I have been struggling with this problem two and I didn't like depending the var name so I found this solution:
public void onCellEdit(CellEditEvent event) {
Entity entity =(Entity)((DataTable)event.getComponent()).getRowData();
}
note that the entity is updated can be merged directly into the DB, also you can still get the old value. PS: thank you @BalusC for everything :)