[
https://issues.apache.org/jira/browse/WICKET-2327?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12719340#action_12719340
]
Ralf Ebert commented on WICKET-2327:
------------------------------------
Ahh, ok, that makes sense. The problem seems to be that I call urlFor for the
Panel inside an embedded WebMarkupContainer.onComponentTagBody. When are calls
to urlFor allowed? API doc says nothing about this. Maybe calls after some
point in time should be disallowed so this fails fast for component developers?
(the resulting urls will work in most cases, so you're introducing a very, very
subtle bug as component developer when you call urlFor "too late")
> URLs created with urlFor(RequestListenerInterface) on a bookmarkable page try
> to instantiate a new page after the page expired
> ------------------------------------------------------------------------------------------------------------------------------
>
> Key: WICKET-2327
> URL: https://issues.apache.org/jira/browse/WICKET-2327
> Project: Wicket
> Issue Type: Bug
> Components: wicket
> Affects Versions: 1.4-RC4
> Reporter: Ralf Ebert
> Fix For: 1.4-RC6
>
> Attachments: mvn2327.zip
>
>
> When a component on a bookmarkable page uses urlFor to generate a URL to
> receive events, such an url is generated:
> http://localhost:8080/?wicket:bookmarkablePage=:somepkg.SomePage&wicket:interface=:12:bla::ISomeEventListener::
> If the given page expires and the URL is opened, Wicket tries to create a new
> page instead of throwing a PageExpiredException. This is incorrect in my
> opinion, because the URLs intention is to call a listener interface. In my
> understanding this cannot happen after the state of the page is lost, so a
> PageExpiredException should be thrown in this case (or a "non-bookmarkable"
> URL should be generated).
> Stack trace:
> at
> org.apache.wicket.session.DefaultPageFactory.createPage(DefaultPageFactory.java:212)
> at
> org.apache.wicket.session.DefaultPageFactory.newPage(DefaultPageFactory.java:89)
> at
> org.apache.wicket.request.target.component.BookmarkablePageRequestTarget.newPage(BookmarkablePageRequestTarget.java:306)
> at
> org.apache.wicket.request.target.component.BookmarkablePageRequestTarget.getPage(BookmarkablePageRequestTarget.java:321)
> at
> org.apache.wicket.request.target.component.BookmarkableListenerInterfaceRequestTarget.processEvents(BookmarkableListenerInterfaceRequestTarget.java:126)
> at
> org.apache.wicket.request.AbstractRequestCycleProcessor.processEvents(AbstractRequestCycleProcessor.java:92)
> at
> org.apache.wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:1240)
> at org.apache.wicket.RequestCycle.step(RequestCycle.java:1319)
> at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1418)
> at org.apache.wicket.RequestCycle.request(RequestCycle.java:544)
> at
> org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:456)
> at
> org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:289)
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.