Skip to main content



      Home
Home » Eclipse Projects » JFace » [databinding] How to validate multiple properties cross-referenced
[databinding] How to validate multiple properties cross-referenced [message #657567] Thu, 03 March 2011 05:19 Go to next message
Eclipse UserFriend
Hi,

first of all, I'm a JFace newbie, so I kindly ask forgiveness if I ask a dummy question.

Suppose to have a model with three (integer) properties: a minimum value (min), a maximum value (max), and a default value (d). Obviously, these properties must satisfy the following two constraints:
(1) each of them must be a number
(2) min <= d <= max

I'm writing a JFace wizard so to allow the user to create an instance of such model.
Since I would like to provide the user with a notification about the errors in his inputs, I leverage the JFace validation framework, and I'm able to warn the user if he inserts an invalid number.

However, I'm stuck with the second constraint... how can I validate it?

Thanks,
Matteo
Re: [databinding] How to validate multiple properties cross-referenced [message #658240 is a reply to message #657567] Mon, 07 March 2011 09:47 Go to previous message
Eclipse UserFriend
As outlined in my other response you can't do this with IValidators on
the UpdateValueStrategy. The only possible solution is to implement an
IValidationStatusProvider on your DatabindingContext.

Tom

Am 03.03.11 11:19, schrieb Matteo:
> Hi,
>
> first of all, I'm a JFace newbie, so I kindly ask forgiveness if I ask a
> dummy question.
>
> Suppose to have a model with three (integer) properties: a minimum value
> (min), a maximum value (max), and a default value (d). Obviously, these
> properties must satisfy the following two constraints:
> (1) each of them must be a number
> (2) min <= d <= max
>
> I'm writing a JFace wizard so to allow the user to create an instance of
> such model. Since I would like to provide the user with a notification
> about the errors in his inputs, I leverage the JFace validation
> framework, and I'm able to warn the user if he inserts an invalid number.
> However, I'm stuck with the second constraint... how can I validate it?
>
> Thanks,
> Matteo
Previous Topic:Clearing cached elements in virtual table
Next Topic:databinding and EMF Validation
Goto Forum:
  


Current Time: Mon Jun 30 19:10:53 EDT 2025

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

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

Back to the top