Eclipse Community Forums - RDF feed
https://www.eclipse.org/forums/
Eclipse Community Forums[databinding] How to validate multiple properties cross-referenced
https://www.eclipse.org/forums/index.php/mv/msg/205491/657567/#msg_657567
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]]>Matteo Miraz2011-03-03T10:19:26-00:00Re: [databinding] How to validate multiple properties cross-referenced
https://www.eclipse.org/forums/index.php/mv/msg/205491/658240/#msg_658240
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]]>Thomas Schindl2011-03-07T14:47:13-00:00