Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » JFace » [Databinding] JSR-303 support for JFace Databinding Validators (Would like to contribute to Eclipse )
[Databinding] JSR-303 support for JFace Databinding Validators [message #753729] Fri, 28 October 2011 14:06 Go to next message
Angelo ZERR is currently offline Angelo ZERR
Messages: 121
Registered: July 2009
Senior Member
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
Re: [Databinding] JSR-303 support for JFace Databinding Validators [message #755514 is a reply to message #753729] Tue, 08 November 2011 16:50 Go to previous messageGo to next message
Angelo ZERR is currently offline Angelo ZERR
Messages: 121
Registered: July 2009
Senior Member
Hi,

Just for your information we are using the JSR-303 support for JFace Databinding in our RAP demo at http://xdocreport-rap.opensagres.cloudbees.net/xdocreport?startup=fr.opensagres.xdocreport.eclipse.application

For instance if you edit a resume and you fill email with bad value, you will have errors displayed in the editor (see attached screen) :

index.php/fa/6061/0/

Regards Angelo
Re: [Databinding] JSR-303 support for JFace Databinding Validators [message #755627 is a reply to message #753729] Wed, 09 November 2011 05:34 Go to previous messageGo to next message
Matthew Hall is currently offline Matthew Hall
Messages: 368
Registered: July 2009
Senior Member
Hey Angelo,

This is looking really good! Definitely looking forward to your patch!

There's been some prior work done on bug 279166 [1], so when you're
ready feel free to attach your patch there.

Matthew

[1] https://bugs.eclipse.org/bugs/show_bug.cgi?id=279166



On 10/28/2011 08:06 AM, Angelo wrote:
> Hi,
> We have developped
> http://wiki.eclipse.org/JFace_Data_Binding/JSR303BeanJFaceDatabindingValidation
> (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
>
Re: [Databinding] JSR-303 support for JFace Databinding Validators [message #755642 is a reply to message #755627] Wed, 09 November 2011 08:19 Go to previous message
Angelo ZERR is currently offline Angelo ZERR
Messages: 121
Registered: July 2009
Senior Member
Hi Matthew ,

Thank a lot for your answer! I have created a patch like you have suggested me at
https://bugs.eclipse.org/bugs/show_bug.cgi?id=279166#c10

Hope you will like it.

Regards Angelo
Previous Topic:TreeViewerEditor: Multi select / column width?
Next Topic:Refresh issue with tableviewer
Goto Forum:
  


Current Time: Wed Oct 22 04:55:47 GMT 2014

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

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