Do Beanvalidation(JSR-303) and editor framework play along well ?

103 views
Skip to first unread message

Karthik Reddy

unread,
Aug 3, 2011, 1:50:00 AM8/3/11
to google-we...@googlegroups.com
In other words does a call like SimpleBeanEditorDriver.getErrors()  give me a list of errors. I am trying this in 2.3 and I do not seem to be able to  retrieve the errors via SimpleBeanEditorDriver.getErrors() .


Miroslav Genov

unread,
Aug 3, 2011, 5:10:22 AM8/3/11
to google-we...@googlegroups.com
Yeah, in 2.3 validation is a little bit broken, cause it was fully refactored after GWT 2.2. The things are working well in GWT 2.4-rc1 I think. 

DynaTableRf contains a nice validation example. To check whether JSR-303 is working, just check that demo project but don't forget to remove this validation check from PersonEditorWorkflow.java

// Check for errors
if (editorDriver.hasErrors()) {
  dialog.setText("Errors detected locally");
//  return;
}

Karthik Reddy

unread,
Aug 3, 2011, 3:02:01 PM8/3/11
to google-we...@googlegroups.com
Thanks for the helpful info.

I will go ahead and build the DynatableRF sample in 2.4 and try it out . Hopefully, in 2.4's  DynatableRF,  I could witness the fruits of the  marriage between client-side validation and editor framework.

objectuser

unread,
Aug 3, 2011, 3:21:04 PM8/3/11
to google-we...@googlegroups.com
Did you happen to follow any sort of guide to getting validation working in 2.4 RC1?  I failed in my attempt.

Karthik Reddy

unread,
Aug 3, 2011, 3:58:06 PM8/3/11
to google-we...@googlegroups.com
First bump in the road. As I try to run my DynatableRF sample (2.4 ) I run into the following exception:

Caused by: java.lang.NoClassDefFoundError: org/json/JSONException
at com.google.web.bindery.autobean.shared.impl.StringQuoter.createSplittable(StringQuoter.java:58)

Caused by: java.lang.ClassNotFoundException: null
at com.google.gwt.dev.shell.CompilingClassLoader$MultiParentClassLoader.findClass(CompilingClassLoader.java:365)

I did make sure I have json-20090211.jar(this is the jar that contains the class org.json.JSONException) in my server's classpath. 


Reply all
Reply to author
Forward
0 new messages