You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Ravi Knox (JIRA)" <ji...@apache.org> on 2016/07/01 09:43:11 UTC

[jira] [Comment Edited] (WICKET-6182) Remove recreateBookmarkablePagesAfterExpiry check in Component#createRequestHandler

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

Ravi Knox edited comment on WICKET-6182 at 7/1/16 9:42 AM:
-----------------------------------------------------------

-Works!-
-Thank you.-

Sorry, but I have to correct myself.

The way I use it, it still does not work.
In a nutshell that's what we try to archive:
Save a cookie on a client browser under the path of the current page. 
The page does have a *mandatory named parameter*!
If the Session expires. The SessionExpiredPage will read the cookie and start a redirect.

What happens now is that by the time the AbstractBookmarkableMapper wants to generate the URL of the component, before including the existent parameters, 
it does an getRecreateMountedPagesAfterExpiry() check (see https://github.com/apache/wicket/blob/wicket-7.x/wicket-core/src/main/java/org/apache/wicket/core/request/mapper/AbstractBookmarkableMapper.java#L479). which answers false and the existing parameters are not added to the new UrlInfo object.

That in return will lead to a failure when calling setPlaceholders(copy, url) (see https://github.com/apache/wicket/blob/wicket-7.x/wicket-core/src/main/java/org/apache/wicket/core/request/mapper/MountedMapper.java#L206) and results in a null url return value, that lets wicket default to the generic URL we had before.


was (Author: ravi knox):
Works!
Thank you.

> Remove recreateBookmarkablePagesAfterExpiry check in Component#createRequestHandler
> -----------------------------------------------------------------------------------
>
>                 Key: WICKET-6182
>                 URL: https://issues.apache.org/jira/browse/WICKET-6182
>             Project: Wicket
>          Issue Type: Improvement
>          Components: wicket
>    Affects Versions: 7.2.0
>            Reporter: Ravi Knox
>            Assignee: Martin Grigorov
>             Fix For: 8.0.0-M1, 7.4.0
>
>
> When setting setRecreateBookmarkablePagesAfterExpiry(false) wicket does not use the BookmarkableListenerInterfaceRequestHandler in Component#createRequestHandler() for mounted Pages.
> That makes it impossible to read cookies that have the mounted page as its path because the Listener URL points to http://some-url.com/wicket/page?1-1IBehaviorListener... instead of http://some-url.com/myPage/?1-1IBehaviorListener...
> See also
> http://apache-wicket.1842946.n4.nabble.com/Implications-of-setRecreateBookmarkablePagesAfterExpiry-td4674899.html



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)