简体   繁体   中英

Wicket infinite reloading page while using Lazy Loading panels

I have the Wicket Page, which only creates in constructor the ListView. These list view items are only components present on the page.

For loading these components I am using AsynchronousUpdatePanel from third side library: https://gist.github.com/jonnywray/594468

I want to use asynchronous panel, because some components are loading 300 ms, but some 10 seconds.

Problem is, that sometimes when I want to refresh the page some infinite cycle begins and the page reloads over and over again . The lazy indicators are shown and after few ms page refresh them again. User must close this browser tab and start again.

When infinite cycle starts, the StalePageException is thrown again and again, which starting the page reload. Then, the app console is full of these:

WARN RequestCycleExtra - ********************************
WARN RequestCycleExtra - Handling the following exception
org.apache.wicket.core.request.mapper.StalePageException: A request to page '[Page class = *.*Page, id = 1, render count = 2]' has been made with stale 'renderCount'. The page will be re-rendered.
WARN RequestCycleExtra - ********************************

I Cant find, what I am doing wrong. Components, which are loading have models, which loads in Callable thread on background through AsynchronousUpdatePanel and after that, the onPostSuccess method is called and in this method I am replacing the lazy indicator with my panel (component), which has the loaded model now.

Thank you for any answer.

You should create a quickstart and ask for help on the Wicket mailing list. Without debugging it's hard to find the cause of the problem.

Note that AsynchronousUpdatePanel/FutureUpdateBehavior seem to violate some Wicket principles (eg transient non-serializable "future" fields).

Furthermore since Wicket 8 AjaxLazyLoadPanel has support for parallel asynchronous lazy-loading, maybe you want to try that instead.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM