use of org.eclipse.scout.rt.client.ui.basic.table.ITableRowCustomValueContributor in project scout.rt by eclipse.
the class AbstractColumn method setValue.
protected void setValue(ITableRow r, VALUE value, boolean updateValidDisplayText) {
try {
Cell cell = r.getCellForUpdate(this);
cell.removeErrorStatus(ValidationFailedStatus.class);
VALUE newValue = validateValue(r, value);
// set newValue into the cell only if there's no error.
if (!cell.hasError()) {
r.setCellValue(getColumnIndex(), newValue);
if (this instanceof ITableRowCustomValueContributor) {
((ITableRowCustomValueContributor) this).enrichCustomValues(r, r.getCustomValues());
}
}
ensureVisibileIfInvalid(r);
if (updateValidDisplayText) {
updateDisplayText(r, newValue);
}
} catch (ProcessingException e) {
if (LOG.isDebugEnabled()) {
LOG.debug("Error setting column value ", e);
}
Cell cell = r.getCellForUpdate(this);
// add error
cell.addErrorStatus(new ValidationFailedStatus<VALUE>(e, value));
updateDisplayText(r, value);
}
}
Aggregations