I have a table view in which few columns are editable and few are non-editable. When i keyin some value in first column and press tab , a service is called and the returned object is mapped to table row. My requirement is to make the non-editable column as editable(only in the row where i have editied) based on a flag in returned object. Below is the code for calling service and setting returned object to row.
colCtrNo.setOnEditCommit(new EventHandler<CellEditEvent<CtrRcptDlvryDTO, String>>() {
@Override
public void handle(CellEditEvent<CtrRcptDlvryDTO, String> t) {
CtrRcptDlvryDTO c = t.getTableView().getSelectionModel().getSelectedItem();
if(c.getCtrNo() != null && !"".equals(c.getCtrNo())){
c = GateIn.gatePassServiceRef.gateIn_validateRcptCtrFx(c, 1, 5090,null);
tblReceiptContent.set(t.getTablePosition().getRow(), c);
}
}
});
Please suggest how to turn non-editable columns into editable based on a flag at runtime.