PrimeFaces

onCellEdit get row object and update cell

public void onCellEdit(CellEditEvent event) {
    Entity response = (Entity) ((DataTable) event.getComponent()).getRowData();

    Integer oldValue = (Integer) event.getOldValue();
    Integer newValue = (Integer) event.getNewValue();

    if (newValue != null && !newValue.equals(oldValue)) {
        service.update(entity);
    }
}

PrimeFaces galleria redirect onclick using remoteCommand