Hi,
I have this urgent an vital problem i must solve, so i hope someone could
assist.
I am seeing this odd case of double/triple submit of forms, that should't
I hope someone can explain what goes wrong.
I have a page that i am adding a Form to. The page and form is
straightforward and contains:
public FirstPage(PageParameters parameters) {
...
MyForm form = new MyForm("myForm", kmt);
..
form.add(new SubmitLink("continue"));
add(form);
}
class MyForm extends Form {
...
protected void onSubmit() {
MyEvent event = (MyEvent ) getSession().getApprovalEvent();
getModelManager().handleEvent(event);
FinishEvent finishEvent = new FinishEvent ();
....
getModelManager().handleEvent(finishEvent );
setResponsePage(ReceiptPage.class, new
PageParameters("secure=ok"));
}
}
As i understand wicket, it should not be possible to submit the form several
times.
However i can see in the log, that a second and even a third post is
submitted, just
before the line setResponsePage(ReceiptPage.class ... is reached/executed.
The second submit will fail, because the first MyEvent must only be executed
once.
Can anyone explain how this could occur...
Thanks in advance ...
Muro