[
https://issues.apache.org/jira/browse/MYFACES-3879?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Leonardo Uribe resolved MYFACES-3879.
-------------------------------------
Resolution: Fixed
> Passthrough attributes for f:selectItem and f:selectItems should be rendered
> by associated components
> -----------------------------------------------------------------------------------------------------
>
> Key: MYFACES-3879
> URL: https://issues.apache.org/jira/browse/MYFACES-3879
> Project: MyFaces Core
> Issue Type: Bug
> Components: JSR-344
> Reporter: Leonardo Uribe
> Assignee: Leonardo Uribe
> Fix For: 2.2.3
>
>
> Reported by Sebastian Mellmann:
> Hello everyone,
>
> I have just run into a problem where the 'title' attribut is not being
> rendered using the <h:selectOneMenu> tag.
> Used version is MyFaces Core 2.2.2
>
> I had a look into the source code and the following changes seem to fix the
> problem:
>
> Class: org.apache.myfaces.shared.renderkit.html.HtmlRendererUtils
> Method: renderSelectOptions (Line 521)
> Code changes listed on pastebin: http://pastebin.com/SHLKxi5H
>
> Can someone confirm this, because I wanted to ask the ML first before opening
> an issue via Apache JIRA for MyFaces?!
>
> Thanks and regards,
> Sebastian
> The problem is not the title fix, is that passthrough attributes must work
> for components created by effect of f:selectItem and f:selectItems. There is
> a line in the renderkit javadoc of javax.faces.SelectMany/javax.faces.Listbox
> that says:
> "... In both the case of the "option" element or the "optgroup"
> element, the implementation must pass the UISelectItem or
> UISelectItems corresponding to the SelectItem bean to the call to
> ResponseWriter.startElement(). ..."
> I tested against Mojarra 2.2.6 and it is correct. But Mojarra has a bug in
> this part, because components like h:selectManyCheckbox or h:selectOneRadio
> should work just the same, but in this case a set of "input" html tags are
> rendered instead. It is clear the renderkit javadoc reference how the
> "option" is rendered, so we should follow the spirit of the spec in this
> part, which is allow to define passthrough attributes for f:selectItem and
> f:selectItems.
--
This message was sent by Atlassian JIRA
(v6.2#6252)