[EMF Forms] RCP: Custom validator: no controls highlighting [message #1711472] |
Fri, 16 October 2015 11:03 |
Klim Tow Messages: 49 Registered: September 2015 |
Member |
|
|
Hi all
in my RCP application I try to perform validation in the EMF Forms layer using custom validator.
I register the validator like this:
EValidator.Registry.INSTANCE.put(MyPackage.eINSTANCE, new EValidator.Descriptor() {
public EValidator getEValidator() {
return new MyValidator();
}
});
That is the generated validator instance is replaced with the custom (it extends the generated).
The validation goes inside the AdapterImpl.notifyChanged(Notification) like this:
Diagnostician.INSTANCE.validate(eObject, context);
DiagnosticChain gets full of diagnostics, but EMF Forms view does not highlight the affected controls.
These diagnostics get never put into the view model context.
Is there a way to highlight the affected controls in this setup or is this something would never work?
Maybe put the diagnostics into the view model context after validation and re-render the whole view?
If this is the way, then is it possible to re-render only the affected controls instead of the whole view?
[Updated on: Fri, 16 October 2015 15:23] Report message to a moderator
|
|
|
|
|
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03963 seconds