Receiver.onViolation is called several times when there are validation 
errors after each request. 

interface Driver extends RequestFactoryEditorDriver<ItemProxy, ItemEditor>{}

private ItemRequest request;

public void edit(...){

...
request = requestFactory.itemRequest();
...

}

public void getItem() {

request.getItemById(/*give id here*/ id).fire(new Receiver<ItemProxy>(){


@Override

public void onSuccess(ItemProxy response) {

// ....

}

@Override
public void onFailure(ServerFailure error) {
}

@Override
public void onViolation(Set<Violation> errors) {

showErrors(errors);

}
});

When I call this method first time, and sending request fail with 
violations, method onViolation() is called only once.
Its OK to this point.

(call -> getItem() = call -> onViolation() )

The problem is: if I call this method second time and request fails again, 
method onViolations() is called two times in row. 

(call -> getItem() = call -> onViolation() -> onViolation())

If I call this method third time, onViolations() is called three times in 
row.

(call -> getItem() = call -> onViolation() -> onViolation() -> 
onViolation())

after N calls.

(1 call -> getItem() = call -> onViolation() -> onViolation() -> N)
 

-- 
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