Hello,
We're having a problem using the request factory in GWT 2.5 RC1. When
calling *rejectBankCheck() *on the activity, it happens that there are bean
validation errors. The service method corresponding to this request call is
not invoked. By correcting the errors on the UI and clicking on a button, *
rejectBankCheck()* is called again. This time, the receiver gets *onSuccess().
*Everything looks fine, but I can see that both,* onSuccess()* and the
service method corresponding to *rejectBankCheck()*, are invoked twice!
public void rejectBankCheck(String remarks) {
request.rejectBankCheck(entity, remarks)
.fire(new Receiver<ProtocolProxy>() {
@Override
public void onSuccess(ProtocolProxy response) {
display.onRejectSuccess();
}
@Override
public void onConstraintViolation(Set<ConstraintViolation<?>>
violations) {
display.setConstraintViolations(violations);
}
});
}
My first intention was to split this in two steps:
1. initialize the receiver when the activity starts
2. when the user clicks on the button, just call *fire()* on the request
context
This isn't possible, because the parameter *remarks *of the method is a
user input and can change between the two invocations. So I have to call
*request.rejectBankCheck(entity,
remarks)* every time the user clicks.
Here are my questions:
1. Is this a bug or a feature of the request factory? At the moment, I
cannot see when this behaviour would be necessary or of any help.
2. Can anyone see a workaround for this?
Thank's for your help!
--
You received this message because you are subscribed to the Google Groups
"Google Web Toolkit" group.
To view this discussion on the web visit
https://groups.google.com/d/msg/google-web-toolkit/-/ffd359cizv4J.
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.