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

Chris Colman commented on WICKET-4079:
--------------------------------------

I haven't got any unit tests at this stage but I have thoroughly tested
in myself. The previous version worked fine so long as no trailing /
appear. I've tested that this version works without or with a trailing
slash.

I'll try to get some unit tests built when I get some spare time but
that's pretty scarce at the moment.

compatibility
------------------------------------------------------------------------
-
https://issues.apache.org/jira/browse/WICKET-4079
collection
the
IPageParametersEncoder
to
implement
a
http://www.atlassian.com/software/jira

                
> Provide new HybridPageParametersEncoder class for backwards compatibility 
> with pre 1.5.x Hybrid URL encoding
> ------------------------------------------------------------------------------------------------------------
>
>                 Key: WICKET-4079
>                 URL: https://issues.apache.org/jira/browse/WICKET-4079
>             Project: Wicket
>          Issue Type: Improvement
>          Components: wicket
>    Affects Versions: 1.5.1
>            Reporter: Chris Colman
>            Assignee: Igor Vaynberg
>            Priority: Minor
>             Fix For: 1.5.1
>
>         Attachments: HybridPageParametersEncoder.java
>
>
> Any 1.4 app that has been live for a while would likely have a collection of 
> links pointing to it from external sites on the web. You really want the 
> Wicket 1.5 version of your app to be able to handle any existing hybrid style 
> links without generating an error.
> The links are in the style:
> /myPage/paramName1/paramValue1/paramName2/paramValue2
> When migrating to 1.5, without a 1.4 compatible IPageParametersEncoder 
> implementation, you need to include the full parameter specification in every 
> mount if you want to avoid making changes to each individual Page class that 
> reads parameters. The attached IPageParametersEncoder implementation means 
> that is no longer necessary. All that is needed is to mount your pages as 
> follows:
> mount(new MountedMapper("/myPage/", MyPage.class, new 
> HybridPageParametersEncoder());
> I'm submitting this .java file as a patch so that hopefully it may be 
> included in future 1.5.x versions of Wicket to make it easy to implement 
> backwards compatible URL parameter encoding for other 1.4 migrators.
> This code is based on a suggestion by luniv on StackOverflow here: 
> http://stackoverflow.com/questions/6154430/how-do-i-mimic-hybridurlcodingstrategy-in-wicket-1-5

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to