You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by "Kalle Korhonen (JIRA)" <ji...@apache.org> on 2013/04/14 08:22:16 UTC

[jira] [Resolved] (TAP5-2084) Form should decode its link parameters

     [ https://issues.apache.org/jira/browse/TAP5-2084?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Kalle Korhonen resolved TAP5-2084.
----------------------------------

       Resolution: Fixed
    Fix Version/s: 5.4
                   5.3.7

Applied cleanly, thanks Denis!
                
> Form should decode its link parameters
> --------------------------------------
>
>                 Key: TAP5-2084
>                 URL: https://issues.apache.org/jira/browse/TAP5-2084
>             Project: Tapestry 5
>          Issue Type: Bug
>    Affects Versions: 5.3
>            Reporter: Denis Stepanov
>            Assignee: Kalle Korhonen
>             Fix For: 5.3.7, 5.4
>
>         Attachments: 0001-TAP5-2084-Form-should-decode-its-link-parameters.patch
>
>
> The Form component will add all its action event link parameters as hidden inputs, but link parameter's value is encoded and hidden input field value is not, because of that parameter's value will be encoded on arrival.
> simple request:
> //add parameter to the link
> link.addParameter ("abc", URLDecoder.encode(abcValue, "UTF-8")) 
> on event:
> request.getParameter("abc") is equals to abcValue
> form request:
> // add parameter to the form action link using the LinkCreationHub
> link.addParameter ("abc", URLDecoder.encode(value, "UTF-8")) 
> on event:
> request.getParameter("abc") is not equals to abcValue, parameter's value is encoded
> It could be fixed by decoding parameter's value at line:
>      writer.element("input", "type", "hidden", "name", parameterName, "value", value); 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira