Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » [DataBinding] Validation
[DataBinding] Validation [message #447582] Tue, 11 April 2006 07:36 Go to next message
Sébastien Letélié is currently offline Sébastien LetéliéFriend
Messages: 33
Registered: July 2009
Member
With the "partially validation" the event prevent user from writing in
the field if the condition is invalid (Validator.isPartiallyValid()).
Sometimes i 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 i don't
fing where this difference is 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(partialValidationE rror);
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.

What is your opinion on this behave ?
Re: [DataBinding] Validation [message #447616 is a reply to message #447582] Wed, 12 April 2006 03:41 Go to previous messageGo to next message
Dave Orme is currently offline Dave OrmeFriend
Messages: 424
Registered: July 2009
Senior Member
Sébastien Letélié wrote:
> What is your opinion on this behave ?

I think you found a bug. :-) Please open a bug report and attach your
example code so we don't lose your fix.


Thanks!


Regards,

Dave Orme
--
Visual Editor Project lead
http://www.coconut-palm-software.com
http://www.db4o.com -- The Open-source Java Object Database
Re: [DataBinding] Validation [message #447662 is a reply to message #447616] Wed, 12 April 2006 06:52 Go to previous message
Sébastien Letélié is currently offline Sébastien LetéliéFriend
Messages: 33
Registered: July 2009
Member
https://bugs.eclipse.org/bugs/show_bug.cgi?id=136280

David J. Orme a écrit :
> Sébastien Letélié wrote:
>> What is your opinion on this behave ?
>
> I think you found a bug. :-) Please open a bug report and attach your
> example code so we don't lose your fix.
>
>
> Thanks!
>
>
> Regards,
>
> Dave Orme
Previous Topic:How Can I link my RCP Application with Wizard page ?
Next Topic:How to access my own plug-in in the RCP program
Goto Forum:
  


Current Time: Thu Nov 07 16:33:47 GMT 2024

Powered by FUDForum. Page generated in 0.05816 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top