ICEfaces
  1. ICEfaces
  2. ICE-9568

ace:simpleSelectOneMenu does not render f:selectitems with new spec correctly

    Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: 3.3
    • Fix Version/s: None
    • Component/s: ACE-Components
    • Labels:
      None
    • Environment:
      Windows Server, Jboss 6.1 with Mojarra 2.4

      Description

      The ace simpleSelectOneMenu does not render f:selectItems correctly when they are specified using the new POJO support on f:selectItems. e.g.

      <ace:simpleSelectOneMenu value="#{bean.selectedPojo}">
        <f:selectItems value="#{bean.pojoList}"
                              var="n"
                              itemValue="#{n}"
                              itemLabel="#{n.labelAttr}"/>
      <ace:simpleSelectOneMenu>

      The exception thrown is java.lang.ClassCastException: pojo.example.Pojo cannot be cast to javax.faces.model.SelectItem

        Activity

        Hide
        Louis Nolan added a comment -

        Changing the code to

        <h:selectOneMenu value="#

        {bean.selectedPojo}">
        <f:selectItems value="#{bean.pojoList}"
        var="n"
        itemValue="#{n}"
        itemLabel="#{n.labelAttr}"/>
        <h:selectOneMenu>

        or

        <ice:selectOneMenu value="#{bean.selectedPojo}

        ">
        <f:selectItems value="#

        {bean.pojoList}

        "
        var="n"
        itemValue="#

        {n}

        "
        itemLabel="#

        {n.labelAttr}

        "/>
        <ice:selectOneMenu>

        works perfectly

        Show
        Louis Nolan added a comment - Changing the code to <h:selectOneMenu value="# {bean.selectedPojo}"> <f:selectItems value="#{bean.pojoList}" var="n" itemValue="#{n}" itemLabel="#{n.labelAttr}"/> <h:selectOneMenu> or <ice:selectOneMenu value="#{bean.selectedPojo} "> <f:selectItems value="# {bean.pojoList} " var="n" itemValue="# {n} " itemLabel="# {n.labelAttr} "/> <ice:selectOneMenu> works perfectly

          People

          • Assignee:
            Unassigned
            Reporter:
            Louis Nolan
          • Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated: