GWT 2.4.0, class-level bean validations

62 views
Skip to first unread message

Wayne Marsh

unread,
May 3, 2012, 1:14:24 PM5/3/12
to google-we...@googlegroups.com
Hi all. I've marked an Editor up with HasEditorErrors<SomeEntity> so that it can receive custom, class-level validations and report the errors appropriately.

I'm probably doing this wrong, because I don't get the class-level errors passed to the top-level editor. It also gets sub-editor errors passed to it (which I'd expect, using ValueBoxEditorDecorator which doesn't consume errors) twice each (I certainly wouldn't expect that).

I've attached the full project (for Eclipse) here: http://dl.dropbox.com/u/64766626/TestClassLevelConstraints.zip

If anybody familiar with the Editor framework and bean validation in GWT could give me some feedback I'd appreciate that. (Also, people stuck with trying to integrate bean validation working might find the simple project useful. It's a chore to get anything working at this point).

(As an aside, can anybody shed some light on why I'm getting the ScriptAssertImpl and URL errors at compile-time? They're not fatal, and I can make them disappear by defining my own URL and ScriptAssertImpl classes, but am I doing something wrong? I've seen some very old GWT discussions where it seemed like that was fixed, but it isn't for me. Wrong jars?)

Thomas Broyer

unread,
May 4, 2012, 4:21:08 AM5/4/12
to google-we...@googlegroups.com

On Thursday, May 3, 2012 7:14:24 PM UTC+2, W Marsh wrote:
Hi all. I've marked an Editor up with HasEditorErrors<SomeEntity> so that it can receive custom, class-level validations and report the errors appropriately.

I'm probably doing this wrong, because I don't get the class-level errors passed to the top-level editor.

It looks like an known issue that was fixed in February: http://code.google.com/p/google-web-toolkit/source/detail?r=10886
 
It also gets sub-editor errors passed to it (which I'd expect, using ValueBoxEditorDecorator which doesn't consume errors) twice each (I certainly wouldn't expect that).

You get one for the ValueBoxEditorDecorator and one for the ValueBoxEditor that's "decorated".

Wayne Marsh

unread,
May 4, 2012, 5:26:51 AM5/4/12
to google-we...@googlegroups.com


On Friday, 4 May 2012 09:21:08 UTC+1, Thomas Broyer wrote:

On Thursday, May 3, 2012 7:14:24 PM UTC+2, W Marsh wrote:
Hi all. I've marked an Editor up with HasEditorErrors<SomeEntity> so that it can receive custom, class-level validations and report the errors appropriately.

I'm probably doing this wrong, because I don't get the class-level errors passed to the top-level editor.

It looks like an known issue that was fixed in February: http://code.google.com/p/google-web-toolkit/source/detail?r=10886

Brilliant, thanks.
 
 
It also gets sub-editor errors passed to it (which I'd expect, using ValueBoxEditorDecorator which doesn't consume errors) twice each (I certainly wouldn't expect that).

You get one for the ValueBoxEditorDecorator and one for the ValueBoxEditor that's "decorated".

That makes sense. 
Reply all
Reply to author
Forward
0 new messages