Thursday, January 27, 2011

OnViolation method doesnt show error message.

When I execute the next code, and when onViolation() method is called, no error message is showed in the ValueBoxEditorDecorator.
Any idea why?

@UiField
ValueBoxEditorDecorator<String> itemName;
....

public void onClick(){
....
  ItemRequest request = requestFactory.ItemRequest();
  ItemProxy proxy = request.create(ItemProxy.class);

  proxy.setItemName("name");

  request.getItemByName("name");

  driver.edit(proxy, request);

  driver.flush().fire(new Receiver<Void>(){
    @Override
    public void onSuccess(Void response) {

    }

    @Override
    public void onViolation(Set<Violation> errors) {
      driver.setViolations(errors);
    }
  });
}

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

No comments:

Post a Comment