Martijn Dashorst created WICKET-5998:
----------------------------------------
Summary: Page is detached twice in same AJAX request
Key: WICKET-5998
URL: https://issues.apache.org/jira/browse/WICKET-5998
Project: Wicket
Issue Type: Bug
Components: wicket
Affects Versions: 7.0.0
Reporter: Martijn Dashorst
Priority: Minor
While debugging some code I noticed that detaching happens twice during the
same (AJAX) request.
First through `ListenerInterfaceRequestHandler.detach()` and next through
`AjaxRequestHandler.detach(IRequestCycle)`.
The following stack traces show the code paths.
{code}
Thread [qtp1297836716-57] (Suspended (breakpoint at line 858 in MyWebPage))
MyWebPage.onDetach() line: 858
MyWebPage(Component).detach() line: 1162
PageAndComponentProvider(PageProvider).detach() line: 330
ListenerInterfaceRequestHandler.detach(IRequestCycle) line: 128
RequestCycle$HandlerExecutor.detach(IRequestHandler) line: 876
RequestCycle$HandlerExecutor(RequestHandlerStack).detach() line: 180
RequestCycle.onDetach() line: 641
RequestCycle.detach() line: 594
RequestCycle.processRequestAndDetach() line: 297
WicketFilter.processRequestCycle(RequestCycle, WebResponse,
HttpServletRequest, HttpServletResponse, FilterChain) line: 261
WicketFilter.processRequest(ServletRequest, ServletResponse,
FilterChain) line: 203
WicketFilter.doFilter(ServletRequest, ServletResponse, FilterChain)
line: 284
Thread [qtp1297836716-57] (Suspended (breakpoint at line 858 in MyWebPage))
MyWebPage.onDetach() line: 858
MyWebPage(Component).detach() line: 1162
AjaxRequestHandler$1(PartialPageUpdate).detach(IRequestCycle) line: 417
AjaxRequestHandler.detach(IRequestCycle) line: 277
RequestCycle$HandlerExecutor.detach(IRequestHandler) line: 876
RequestCycle$HandlerExecutor(RequestHandlerStack).detach() line: 180
RequestCycle.onDetach() line: 641
RequestCycle.detach() line: 594
RequestCycle.processRequestAndDetach() line: 297
WicketFilter.processRequestCycle(RequestCycle, WebResponse,
HttpServletRequest, HttpServletResponse, FilterChain) line: 261
WicketFilter.processRequest(ServletRequest, ServletResponse,
FilterChain) line: 203
WicketFilter.doFilter(ServletRequest, ServletResponse, FilterChain)
line: 284
{code}
Is this something that can be prevented? If you have a big component tree,
detaching twice can be quite expensive.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)