Wicket: error while processing form; how to skip to onError()?
-
12-11-2019 - |
Question
I have an AjaxFallbackButton
on my page with its onSubmit
and onError
methods overridden. What is the best practice for dealing with exceptions/errors in the onSubmit
method? Should I just stop processing it, register the error and call onError
like this:
@Override
protected void onSubmit(AjaxRequestTarget target, Form<?> form) {
... // error
form.error("An exception was thrown")
onError();
return;
}
or is there a better way?
No correct solution
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow