[
https://issues.apache.org/jira/browse/MYFACES-4052?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15339333#comment-15339333
]
Leonardo Uribe commented on MYFACES-4052:
-----------------------------------------
Please note it is just an interpretation of the spec, it is not "something
carved on a stone". The important lines of code are on
OutcomeTargetUtils.getOutcomeTargetHref(...). But looking in the code, it looks
like this:
{code:java}
List<UIParameter> validParams = getValidUIParameterChildren(
facesContext, component.getChildren(), true, false);
if (validParams.size() > 0)
{
parameters = new HashMap<String, List<String>>();
}
for (int i = 0, size = validParams.size(); i < size; i++)
{
UIParameter param = validParams.get(i);
String name = param.getName();
Object value = param.getValue();
if (parameters.containsKey(name))
{
parameters.get(name).add(value.toString());
}
else
{
List<String> list = new ArrayList<String>(1);
list.add(value.toString());
parameters.put(name, list);
}
}
{code}
Maybe two UIParameter instances with the same name can be interpreted as the
same source, but as I see it, it is not clear in this case what to do. I'll
reopen it, it looks like it is necessary to investigate more about it.
> 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)