We have a table with some editable columns. The cells in this column are marked with a little grey triangle in the upper left corner and if I click in it, I can modify the content of the cell.
However, we have certain business rules which decides if a row in the table can be changed or not (depending on the content of the row).
I added the following code to the editable cells:
@Override
protected void execDecorateCell(Cell cell, ITableRow row) throws ProcessingException {
if (someBusinessLogic(getCriteriaColumn().getValue(row))) {
cell.setEditableInternal(false);
}
}
However, this does not have the desired result. Those cells that should be editable still show the triangle and they are editable. But those cells that should not be editable are still editable, even though they no longer show the triangle.
It seems that the triangle-indicator is updated correctly, but the effective editable-property of the cell is not.
Am I doing something wrong or is this a bug?
[Updated on: Thu, 11 July 2013 04:48] by Moderator