Skip to content

f:selectItems var unavailable in passthrough attributes #5637

@BalusC

Description

@BalusC

Initially reported in Faces project: jakartaee/faces#1445

this doesn't work

<h:selectOneMenu value="#{bean.selectedCountry}">
   <f:selectItems
            value="#{bean.countries}" var="country"
            itemLabel="#{country.countryName}"
            pt:data-icon="flag flag-#{country.isoCode}"/>
</h:selectOneMenu>

but this works

<h:selectOneMenu value="#{bean.selectedCountry}">
    <c:forEach items="#{bean.countries}" var="country">
        <f:selectItem 
            itemValue="#{country}" 
            itemLabel="#{country.countryName}" 
            pt:data-icon="flag flag-#{country.isoCode}" />   
    </c:forEach>             
</h:selectOneMenu>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions