use of org.eclipse.scout.rt.client.ui.form.fields.IValidateContentDescriptor in project scout.rt by eclipse.
the class AbstractTableField method validateContent.
@Override
public IValidateContentDescriptor validateContent() {
IValidateContentDescriptor desc = super.validateContent();
// super check
if (desc != null) {
return desc;
}
ITable table = getTable();
// check cells
ValidateTableFieldDescriptor tableDesc = null;
TreeSet<String> columnNames = new TreeSet<String>();
if (table != null) {
for (ITableRow row : table.getRows()) {
for (IColumn col : table.getColumns()) {
if (!col.isContentValid(row)) {
if (tableDesc == null) {
tableDesc = new ValidateTableFieldDescriptor(this, row, col);
}
columnNames.add(getColumnName(col));
}
}
}
table.ensureInvalidColumnsVisible();
}
if (tableDesc != null) {
tableDesc.setDisplayText(TEXTS.get("TableName") + " " + getLabel() + ": " + CollectionUtility.format(columnNames));
}
return tableDesc;
}
Aggregations