Hi,
> IMHO this should not happen because the link URL includes the page version
> number and in that version of the page
for Ajax requests the page id is not increased. So your second non-ajax request
hits the same page instance with an updated component tree.
For these cases (mixing ajax with non-ajax inside repeaters) it's better to use
bookmarkable links inside the table - I assume these respond with some kind of
detail page anyways.
Hope this helps
Sven
Am 22. Juli 2021 11:15:51 MESZ schrieb Tobias Gierke
:
>Hi,
>
>I'm currently investigating the root cause of a
>ComponentNotFoundException in our application (Wicket 8.12) that IMHO
>should not happen in the first place (assuming I understood Wicket page
>
>versioning correctly, that is).
>
>1. The offending page displays search results using a DataTable with
>non-AJAX links on items in each of the rows plus one "page backwards"
>and one "page forwards" AJAX link outside of the DataTable to switch to
>
>the next/previous page of results
>
>
>
>+-- data table --+
>| item1 |
>++
>| item2 |
>++
>| etc... |
>++
>
>The crash is happening 100% of the time when doing the following:
>
>1.) Artifically increasing the round-trip time to the server by a lot
>using NetEM (I'm on Linux), for example to a 400ms RTT:
>
>|tc qdisc add dev lo root handle ||1||:||0| |netem delay 200msec|
>
>2.) Clicking the "previous" or "next" AJAX link on the page
>3.) Immediately afterwards clicking any of the regular links inside the
>
>data table rows without waiting for the AJAX request to complete
>
>This gets me a ComponentNotFoundException
>
>org.apache.wicket.core.request.handler.ComponentNotFoundException:
>Component
>'resultList:streamList:streamListTable:body:rows:3:cells:3:cell:link'
>has been removed from page.
>at
>org.apache.wicket.core.request.handler.ListenerRequestHandler.respond(ListenerRequestHandler.java:166)
>at
>org.apache.wicket.request.cycle.RequestCycle$HandlerExecutor.respond(RequestCycle.java:907)
>at
>org.apache.wicket.request.RequestHandlerExecutor.execute(RequestHandlerExecutor.java:65)
>at
>org.apache.wicket.request.cycle.RequestCycle.execute(RequestCycle.java:293)
>at
>org.apache.wicket.request.cycle.RequestCycle.processRequest(RequestCycle.java:254)
>at
>org.apache.wicket.protocol.http.WicketFilter.processRequestCycle(WicketFilter.java:276)
>at
>org.apache.wicket.protocol.http.WicketFilter.processRequest(WicketFilter.java:207)
>
>every time after the AJAX request completes and releases the page lock
>so the second HTTP request is getting processed. IMHO this should not
>happen because the link URL (from the regular link inside the data
>table) includes the page version number and in that version of the page
>
>object graph the Link component should still exist (we've configured
>the
>PageStore to keep 20 versions).
>
>What am I missing here ? Is this somehow related to mixing AJAX and
>non-AJAX requests here ? FWIW, the DataTable is using the default
>ItemReuseStrategy.
>
>Cheers,
>Tobias