Hi,
there a slight difference on how the response is rendered, see
WebPageRenderer#shouldRedirectToTargetUrl()
(isAjax(cycle) && targetUrl.equals(currentUrl))
This is the case for the Ajax submit creating PageOne, where - after the
redirect - an additional page instance is created (since the URL does
not contain a page id).
In both other cases the rendering result of the target page is buffered
and fetch afterwards by the redirect.
Did I miss something or am I misusing RestartResponseException ?
Are the tests in the UnVersionedUrlMapper wrong ?
I don't know why you are using UnVersionedUrlMapper or where it is
coming from, so I cannot comment on it.
Your usage of RestartResponseException seems correct.
Best regards
Sven
On 20.07.21 14:35, Francois Meillet wrote:
I have two pages (identical) called PageOne and PageTwo, each with a form,
mounted with an UnVersionedUrlMapper.
When I do a RestartResponseException in the submit (via an AjaxButton) to the
same page (from pageOne to pageOne),
the PageOne's constructor is called twice. (onInitialize is called once)
But If I throw RestartResponseException (via an AjaxButton) from pageOne to
pageTwo the PageTwo's constructor is called once or if I throw
RestartResponseException (via a standard Button) from pageOne to pageOne the
pageOne's constructor is called once.
Tested with all the 9.x
Here is the test the UnVersionedUrlMapper # mapHandler
if (requestHandler instanceof ListenerRequestHandler || requestHandler
instanceof BookmarkableListenerRequestHandler) {
return null;
}
else {
return super.mapHandler(requestHandler);
}
Did I miss something or am I misusing RestartResponseException ?
Are the tests in the UnVersionedUrlMapper wrong ?
Thanks for your help.
François
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org