You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Alastair Maw (JIRA)" <ji...@apache.org> on 2007/05/09 17:10:15 UTC
[jira] Assigned: (WICKET-65) Handle String array in PageParameters
[ https://issues.apache.org/jira/browse/WICKET-65?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Alastair Maw reassigned WICKET-65:
----------------------------------
Assignee: Alastair Maw (was: Jean-Baptiste Quenot)
> Handle String array in PageParameters
> -------------------------------------
>
> Key: WICKET-65
> URL: https://issues.apache.org/jira/browse/WICKET-65
> Project: Wicket
> Issue Type: Bug
> Components: wicket
> Reporter: Jean-Baptiste Quenot
> Assigned To: Alastair Maw
> Fix For: 1.3
>
> Attachments: 20061114-wicket-WebRequestCodingStrategy-StringArray, 20070104-wicket-1.x-WebRequestCodingStrategy-StringArray, 20070131-wicket-1.x-WebRequestCodingStrategy-StringArray, WebRequestCodingStrategy-StringArray.patch
>
>
> When building PageParameters, it is possible to repeat
> the same parameter name to build a string array, this
> is documented here:
>
> http://wicket.sourceforge.net/apidocs/wicket/util/value/ValueMap.html#add(java.lang.String,%20java.lang.String)
>
> However when issuing setResponsePage(MyPage.class,
> params) the newly constructed URL does not honour the
> string array parameter, only the first value is used.
>
> Example:
>
> PageParameters params = new PageParameters();
> params.add("a", "1");
> params.add("a", "2");
>
> This builds a parameter that is a String[] with name
> "a" and values: ["1", "2"]. But the URL shown in the
> browser is: http://server/app?a=1 instead of
> http://server/app?a=1&a=2
>
> Note that in the target page I'm using
> params.getStringArray("a") to get the string array.
>
> Please find attached a patch against branch wicket-1.x
> that adresses the URL encoding issue. The patch also
> refactors the URL encoding logic to have a more readable
> and compact code.
> Thanks in advance!
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.