Community
Participate
Working Groups
With the "partially validation" the event prevent user from writing in the field if the condition is invalid (Validator.isPartiallyValid()). Sometimes you just want to ask the user that what is writing is not valid and not refusing. The ValidationError object have 2 state WARNING and ERROR, but this difference is not used. I modify the code in the ValueBinding class to change the behave of the targetChangingListener : private final IValueChangingListener targetChangingListener = new IValueChangingListener() { public boolean handleValueChanging(IVetoableValue source, ValueDiff diff) { if (updating) return true; // we are notified of a pending change, do validation // and veto the change if it is not valid Object value = diff.getNewValue(); ValidationError partialValidationError = targetValidator .isPartiallyValid(value); partialValidationErrorObservable.setValue(partialValidationError); return partialValidationError == null || partialValidationError.status == ValidationError.WARNING; } }; Then i the state is error the writing is refused, if the state is warning the ValidationError is returned but the writing is accepted.
We've added the ability to return WARNING and INFO from a validator and it will not terminate the update in bug 169637. Marking as a duplicate of 169637. *** This bug has been marked as a duplicate of bug 169637 ***