[Databinding] JSR-303 support for JFace Databinding Validators [message #753729] |
Fri, 28 October 2011 10:06  |
Eclipse User |
|
|
|
Hi,
We have developped JSR-303 support for JFace Databinding Validators (this link explains how to use it) that we have the intention to use in our Eclipse RAP/RCP application. If you don't know JSR-303, the basic idea is set to your constraint validation with annotation:
public class Person {
...
@Size(min = 1)
private String name;
@Size(min = 1)
@Pattern(regexp = ".+@.+\\.[a-z]+")
private String email;
...
}
For instance Hibernate can use those annotation when Person must be saved in the DB to check the validity of the Pojo.Our JSR-303 support for JFace Databinding Validators implements a IValidator which uses those annotation with JSR-303 API ValidatorFactory. It works too in OSGi context and we have developped several OSGi fragments and OSGi bundles (to change for instance at runtime the JSR-303 Implementation).
I would like do more test and create a patch to contribute to Eclipse.
Hope you will like it.
Regards Angelo
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.24971 seconds