myfaces-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Leonardo Uribe (JIRA)" <...@myfaces.apache.org>
Subject [jira] [Commented] (MYFACES-4052) Multiple <f:param> with same name encodes only last one in link URL
Date Tue, 21 Jun 2016 08:56:57 GMT

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

Leonardo Uribe commented on MYFACES-4052:
-----------------------------------------

Some tests against RI v 2.2.13 shows both ui:param values are rendered in the response, so
it should be considered a bug. Looking back on the svn history, there is an old issue MYFACES-2661
which mentions the issue related to duplicate query params.

In 1.2.x, 2.0.x and 2.1.x branch encodeActionURL is implemented as a call to servletResponse.encodeURL(...),
which suggest something was introduced in 2.2.x.

Looking more on the svn, I found the line was added in revision 1420959, which at that time
it was a refactoring done for the client window api.

The good news is since now we know where this code came from we now it is safe to change it.
The objective of these lines of code is ensure the URL is correctly generated. 

So, the query params that are already on the url are decoded, but later are encoded again.
The key point here is the client window query params must be only once on the response, which
is the main reason why there is a paramMap here, to filter that case.

> Multiple <f:param> with same name encodes only last one in link URL
> -------------------------------------------------------------------
>
>                 Key: MYFACES-4052
>                 URL: https://issues.apache.org/jira/browse/MYFACES-4052
>             Project: MyFaces Core
>          Issue Type: Bug
>    Affects Versions: 2.2.10
>         Environment: TomEE 7.0.0
>            Reporter: Bauke Scholtz
>            Assignee: Leonardo Uribe
>
> Consider:
> {code}
> <h:link value="link">
>     <f:param name="p" value="foo"/>
>     <f:param name="p" value="bar"/>
> </h:link>
> {code}
> MyFaces 2.2.10 renders only last one in link URL instead of both.



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

Mime
View raw message