myfaces-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sebastian Mellmann (JIRA)" <...@myfaces.apache.org>
Subject [jira] [Comment Edited] (MYFACES-3879) Passthrough attributes for f:selectItem and f:selectItems should be rendered by associated components
Date Mon, 12 May 2014 13:06:15 GMT

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

Sebastian Mellmann edited comment on MYFACES-3879 at 5/12/14 1:05 PM:
----------------------------------------------------------------------

Ok I'm getting closer now.

xmlns:p="http://java.sun.com/jsf/passthrough"

Was missing in the header file.

Now I'm using p:title (pt:title did now work!).

A 'title' attribut is now rendered, but it has no value:

<option value="defaultApplication" title="">keine Auswahl</option>


was (Author: mellmann):
Ok I'm getting closer now.

xmlns:p="http://java.sun.com/jsf/passthrough"

Was missing in the header file.

Now I'm using p:title (pt:title did now work!).

A 'title' attribut is not rendered, but it has no value:

<option value="defaultApplication" title="">keine Auswahl</option>

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

Mime
View raw message