I stumbled across a tiny problem today - i have an ajax LoginForm on each
page which either displays an error message or performs a redirect after
login. this works on all pages - except on errorpages the Ajax-debug console
throws an error (Received Ajax response with code: 404) after correctly
performing the login process on server side.
I'm not sure if a 404 should be returned there and if it wouldn't be better
if a 200 was returned if it's an ajax request. To make things short: is this
behaviour intended, should more options be offered (e.g. a flag on
ajaxcomponents where a 200 gets returned anyway) and/or should I raise a
JIRA issue for that?
regards,
Michael
PS: As a workaround I did the following in the onSubmit of my ajaxform:
if (page instanceof IErrorPage) {
final BufferedWebResponse res = (BufferedWebResponse)
RequestCycle.get().getResponse();
if (res.isAjax()) {
res.getHttpServletResponse().setStatus(HttpServletResponse.SC_OK);
}
}
-----
Michael Sparer
http://techblog.molindo.at
--
View this message in context:
http://www.nabble.com/Ajax-components-on-error-pages-tp22741192p22741192.html
Sent from the Wicket - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]