Re: GWT 2.5 RC2 EntityProxy Validation

2012-11-06 Thread Chris Lercher
On Tuesday, November 6, 2012 10:13:59 AM UTC+1, Thomas Broyer wrote: > > Couldn't you simply override the methods and refine the return type? (Java > has covariant return types) > > interface Employee { > Employee getBoss(); > } > > interface EmployeeProxy extends Employee, EntityProxy { > Em

Re: GWT 2.5 RC2 EntityProxy Validation

2012-11-06 Thread Jens
Sounds like the rescue ;-) Indeed that works. -- J. Am Dienstag, 6. November 2012 10:13:59 UTC+1 schrieb Thomas Broyer: > > > > On Monday, November 5, 2012 9:31:30 PM UTC+1, Jens wrote: >> >> Ouch! Totally forgot that you have to return the proxy on client side :( >> Well in that case you probab

Re: GWT 2.5 RC2 EntityProxy Validation

2012-11-06 Thread Thomas Broyer
On Monday, November 5, 2012 9:31:30 PM UTC+1, Jens wrote: > > Ouch! Totally forgot that you have to return the proxy on client side :( > Well in that case you probably have to duplicate your validation > annotations or implement the proxy interface in your entity as mentioned > above. I would

Re: GWT 2.5 RC2 EntityProxy Validation

2012-11-05 Thread Jens
Ouch! Totally forgot that you have to return the proxy on client side :( Well in that case you probably have to duplicate your validation annotations or implement the proxy interface in your entity as mentioned above. I would go with duplication as the entity shouldn't be a proxy. It should be

Re: GWT 2.5 RC2 EntityProxy Validation

2012-11-05 Thread Alex opn
I just tried to implement clientside validation like that and ran into the problem that I get "Incompatible return types" for @OneToMany etc. associations as one has to use the Proxy types as return types in the Proxy interfaces and the Entity interfaces in the Entity interfaces. Anyone has an

Re: GWT 2.5 RC2 EntityProxy Validation

2012-10-13 Thread Jens
Doesn't look that wrong. You need to add validation annotations to the proxy class if you want to do client side proxy validation. As you want to reuse the validation annotations on the server I would think about defining an additional interface IEmployee so that your server Employee class do

GWT 2.5 RC2 EntityProxy Validation

2012-10-12 Thread Daniel Mauricio Patino León
Hello there. I have a question of wich is the best option to validate my domain objects on the client side with RequestFactory. It's posible to validate a Proxy with the new Validation of 2.5 RC2 ? If i do a validation of my proxy don't get any constraints violations. What i did to get a work