|
|
Re: How should I add validation to WindowBuilder-generated data binding? [message #893337 is a reply to message #893329] |
Tue, 03 July 2012 15:23   |
Eclipse User |
|
|
|
Let's take http://www.toedter.com/blog/?p=36 as an example. Note the call
dataBindingContext.bindValue(
SWTObservables.observeText(firstNameText, SWT.Modify),
PojoObservables.observeValue(person, "firstName"),
new UpdateValueStrategy()
.setAfterConvertValidator(new StringRequiredValidator(
"Please enter first name",
firstNameDecoration)),
null);
where an UpdateValueStrategy is constructed manually.
So far as I've seen, UI only generates
new UpdateValueStrategy(UpdateValueStrategy.POLICY_XXX)
in initDataBindings() and doesn't let me customize it by setting validators or converters.
I also can't see a way to change the update strategy after the Binding is created in the API.
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.02525 seconds