use of org.eclipse.nebula.widgets.nattable.data.validate.ValidationFailedException in project nebula.widgets.nattable by eclipse.
the class CrossValidationDialogErrorHandling method validate.
@Override
public boolean validate(int columnIndex, int rowIndex, Object newValue) {
// get the row object out of the dataprovider
EventData rowObject = this.bodyDataProvider.getRowObject(rowIndex);
// as the object itself is not yet updated, we need to validate against
// the given new value
Date fromDate = rowObject.getFromDate();
Date toDate = rowObject.getToDate();
if (columnIndex == 3) {
fromDate = (Date) newValue;
} else if (columnIndex == 4) {
toDate = (Date) newValue;
}
if (!CrossValidationGridExample.isEventDataValid(fromDate, toDate)) {
throw new ValidationFailedException("fromDate is not before toDate");
}
return true;
}
use of org.eclipse.nebula.widgets.nattable.data.validate.ValidationFailedException in project nebula.widgets.nattable by eclipse.
the class CrossValidationDialogErrorHandling method validate.
@Override
public boolean validate(int columnIndex, int rowIndex, Object newValue) {
// get the row object out of the dataprovider
EventData rowObject = this.bodyDataProvider.getRowObject(rowIndex);
// as the object itself is not yet updated, we need to validate against
// the given new value
Date fromDate = rowObject.getFromDate();
Date toDate = rowObject.getToDate();
if (columnIndex == 3) {
fromDate = (Date) newValue;
} else if (columnIndex == 4) {
toDate = (Date) newValue;
}
if (!_4451_CrossValidationGridExample.isEventDataValid(fromDate, toDate)) {
throw new ValidationFailedException("fromDate is not before toDate");
}
return true;
}
Aggregations