Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

StalePageException with Wicket 1.5.5 on reloading the HomePage #7

Closed
kreinhard opened this issue Apr 22, 2012 · 3 comments
Closed

StalePageException with Wicket 1.5.5 on reloading the HomePage #7

kreinhard opened this issue Apr 22, 2012 · 3 comments

Comments

@kreinhard
Copy link

Hi there,

If you try to reload the web page this results in an endless loop (the HomePage flickers and will be reloaded endless).
I like this component but I've no clue how to fix this.
I've a quickstart for the Wicket guys, but you can try your code, it should be reproducible.
I don't know wether it's a bug here or in Wicket.

Regards
Kai

The renderCount of the PageProvider (line 302) doesn't match the renderCount of the pageInstance:

private IRequestablePage getStoredPage(final int pageId)
{
    IRequestablePage storedPageInstance = getPageSource().getPageInstance(pageId);
    if (storedPageInstance != null &&
        (pageClass == null || pageClass.equals(storedPageInstance.getClass())))
    {
        pageInstance = storedPageInstance;
        pageInstanceIsFresh = false;
        if (pageInstance != null)
        {
            if (renderCount != null && pageInstance.getRenderCount() != renderCount)
            {
                throw new StalePageException(pageInstance);
            }
        }
    }
    return storedPageInstance;
}

org.apache.wicket.request.mapper.StalePageException
at org.apache.wicket.request.handler.PageProvider.getStoredPage(PageProvider.java:302)
at org.apache.wicket.request.handler.PageProvider.resolvePageInstance(PageProvider.java:257)
at org.apache.wicket.request.handler.PageProvider.getPageInstance(PageProvider.java:165)
at org.apache.wicket.request.handler.ListenerInterfaceRequestHandler.getPage(ListenerInterfaceRequestHandler.java:100)
at org.apache.wicket.request.handler.ListenerInterfaceRequestHandler.respond(ListenerInterfaceRequestHandler.java:165)
at org.apache.wicket.request.cycle.RequestCycle$HandlerExecutor.respond(RequestCycle.java:781)
at org.apache.wicket.request.RequestHandlerStack.execute(RequestHandlerStack.java:64)
at org.apache.wicket.request.cycle.RequestCycle.execute(RequestCycle.java:255)
at org.apache.wicket.request.cycle.RequestCycle.processRequest(RequestCycle.java:212)
at org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(RequestCycle.java:283)
at org.apache.wicket.protocol.http.WicketFilter.processRequest(WicketFilter.java:185)
at org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:241)

@unterstein
Copy link

Hey there,

i addressed this issue and made a pull request :-).

#8

Cheers,
Johannes

@kreinhard
Copy link
Author

Hi,

thanx for your great job, it works perfectly. The new release of ProjectForge 4.1.0 will be amazing...

Best regards
Kai

@kreinhard kreinhard reopened this Apr 28, 2012
@kreinhard
Copy link
Author

Closed due to this issue: #8

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants