You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Sep 5, 2023. It is now read-only.
But in both Mojarra and MyFaces the attribute itemDescription, itemDisabled, itemLabel are ignored.
But taking a look at the renderkit spec javadoc of javax.faces.SelectMany/javax.faces.Listbox in the section "Rendering the "option" elements" it says this:
"... If the current child is a UISelectItem create a SelectIteminstance from its itemValue, itemLabel, itemEscaped, and itemDescription properties, add it to the list. If the current child is a UISelectItems instance, call its getValue() method. If the result is a SelectItem bean, add it to the list. If the result is an array of SelectItem beans, add each one to the list. If the result is a Collection of SelectItem beans, add each one to the list. If the result is a Map, create a SelectItem bean for each entry in the Map using the key as the label, the value as the value, and null as the description. ..."
So, these properties are supposed to be used with f:selectItem, not with f:selectItems. But the user perceive this as a bug, which is something logic. See:
Facelets tag lib documentation shows the following properties as valid for f:selectItems:
itemValue
itemLabel
itemDescription
itemDisabled
itemLabelEscaped
...
But in both Mojarra and MyFaces the attribute itemDescription, itemDisabled, itemLabel are ignored.
But taking a look at the renderkit spec javadoc of javax.faces.SelectMany/javax.faces.Listbox in the section "Rendering the "option" elements" it says this:
"... If the current child is a UISelectItem create a SelectIteminstance from its itemValue, itemLabel, itemEscaped, and itemDescription properties, add it to the list. If the current child is a UISelectItems instance, call its getValue() method. If the result is a SelectItem bean, add it to the list. If the result is an array of SelectItem beans, add each one to the list. If the result is a Collection of SelectItem beans, add each one to the list. If the result is a Map, create a SelectItem bean for each entry in the Map using the key as the label, the value as the value, and null as the description. ..."
So, these properties are supposed to be used with f:selectItem, not with f:selectItems. But the user perceive this as a bug, which is something logic. See:
https://issues.apache.org/jira/browse/MYFACES-3901
In JSF 2.2 with HTML5 friendly markup, it is supposed that f:selectItems can have passthrough attributes. See:
https://issues.apache.org/jira/browse/MYFACES-3879
But in MyFaces we found that it doesn't work for h:selectOneRadio or h:selectManyCheckbox.
The thing is the fix for this issue is pretty similar for the one that needs to be done for HTML5 friendly markup.
Affected Versions
[2.0, 2.1, 2.2]
The text was updated successfully, but these errors were encountered: