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

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

JSF 2.2 section 7.4.2, before 7.4.2.1 you can see this description:

"...Query string parameters may be contributed by three different sources: the 
outcome (implicit navigation), a nested <f:param> on the component tag (e.g., 
<h:link>, <h:button>, <h:commandLink>, <h:commandButton>), and view parameters. 
When a redirect URL is built, whether it be by the NavigationHandler on a 
redirect case or a UIOutcomeTarget renderer, the query string parameter sources 
should be consulted in the following order: 

- the outcome (implicit navigation) 
- view parameter
- nested <f:param>

If a query string parameter is found in two or more sources, the latter source 
must replace all instances of the query string parameter from the previous 
source(s). ..."

It is the only reference I could found for this case. In summary, f:param 
behaviour depends on the interpretation of the renderer. In this case, there is 
not any mention of how f:param must be interpreted by the renderer, but the way 
how URL links are calculated is defined by the spec by the navigation algorithm.

I think this issue should be closed as invalid, because there is a clear 
mention about how this part should work in the spec and we cannot change that 
behavior, at least from MyFaces side. This change should be done at JSF spec 
level, but I still have doubts about it. There is evidence that 
ViewHandler.getBookmarkableURL(...) receives a  Map<String, List<String>> as 
parameters, but if that so, it looks like f:param could be modified to handle 
List<String> values.



> 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
>
> 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)

Reply via email to