myfaces-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Leonardo Uribe (JIRA)" <>
Subject [jira] [Reopened] (MYFACES-3879) Passthrough attributes for f:selectItem and f:selectItems should be rendered by associated components
Date Mon, 12 May 2014 14:42:14 GMT


Leonardo Uribe reopened MYFACES-3879:

Reopening issue because it was confirmed a bug. The problem is when the values are rendered,
the context is not properly set, so when the passthrough attribute is evaluated, the EL return

> Passthrough attributes for f:selectItem and f:selectItems should be rendered by associated
> -----------------------------------------------------------------------------------------------------
>                 Key: MYFACES-3879
>                 URL:
>             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:
> 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

View raw message