[ 
https://issues.apache.org/jira/browse/WICKET-2327?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12719332#action_12719332
 ] 

Johan Compagner commented on WICKET-2327:
-----------------------------------------

those urls are not  directly a bug but a feature already working for quite some 
time.

Its the hybrid stateless approach for example stateless form works like this.

The thing that could be broken is maybe the page tells that it is 
stateless/bookmarkable to easy.
So it generates the hybrid urls a bit to soon.
It should do it if the page.isBookmarkable() && page.isStatelessHint() i think.
I guess that last part is telling to soon also true? 

If you call setStatelessHint(false) on your page are the urls then correct?

> 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.

Reply via email to