[ https://issues.apache.org/jira/browse/WICKET-3048?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Peter Ertl resolved WICKET-3048. -------------------------------- Assignee: Peter Ertl Resolution: Fixed should be fixed now. Please verify. > Redirect page in Ajax callback broken. > -------------------------------------- > > Key: WICKET-3048 > URL: https://issues.apache.org/jira/browse/WICKET-3048 > Project: Wicket > Issue Type: Bug > Affects Versions: 1.5-M1, 1.5-M2, 1.5-M2.1 > Reporter: Ulon > Assignee: Peter Ertl > > Hi. > In Wicket 1.4.x is possible to redirect to a new page during an AJAX request > by using Component.setResponsePage(Class). > For instance: > form.add(new AjaxButton("myButton", form) { > @Override > protected void onSubmit(final AjaxRequestTarget target, final > Form<?> form) { > setResponsePage(MockPage.class); //Redirect to another page > } > @Override > protected void onError(final AjaxRequestTarget target, final > Form<?> form) { > throw new RuntimeException("Uh oh!"); > } > }); > However, this seems to be broken in Wicket 1.5.x. The ajax response contains > the body of the page to redirect, but Wicket fails to really redirect and > instead it prints ERROR: Wicket.Ajax.Call.failure: Error while parsing > response: Could not find root <ajax-response> element -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.