Hi!

So I finally got Request Factory to work on my Eclipse environment and
I'm trying out the Entity validation features. Following the example
on the tutorial, I add @NotNull to my Entity class property like so:

import javax.validation.constraints.NotNull;
@Entity
public class Employee {
          @NotNull
          private String userName;
 ...

Then I try to trigger the onViolation callback by using:

AppRequestFactory factory = clientfactory.getAppRequestFactory();
EmployeeRequest context = factory.employeeRequest();
EmployeeProxy employeeProxy = context.create(EmployeeProxy.class);
employeeProxy.setDepartment("New Department");
employeeProxy.setPassword("password");
employeeProxy.setUserName(null);
context.add(employeeProxy).fire(new Receiver<Long>() {
...

Unfortunately, the add method succeeds every time I run it even if the
userName property is not set or purposely set to null, as in this
case. Is there something I'm missing here? I haven't tried the other
validation options yet since I can't get something this simple to work
and they'll probably get the same result as this.

Although it might not be related, I'm also not using any Locators for
this entity and use @ProxyForName because of a bug in GWT Plugin for
Eclipse.

- Owen

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.

Reply via email to