ICEfaces
  1. ICEfaces
  2. ICE-10621

ace:simpleSelectOneMenu doesn't iterate over non-SelectItem lists

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 4.0
    • Fix Version/s: 4.1
    • Component/s: ACE-Components
    • Labels:
      None
    • Environment:
      Any
    • Assignee Priority:
      P1
    • Affects:
      Documentation (User Guide, Ref. Guide, etc.)

      Description

      The following will not populate any items in the rendered dropdown:

      <ace:simpleSelectOneMenu value="#{bean.value}">
          <f:selectItems value="#{data.list}"/>
      </ace:simpleSelectOneMenu>

      If #{data.list} resolves to a non-SelectItem list, such as String[].

      However h:selectOneMenu had this functionality added (I think in JSF 2.1 or 2.2).

      Similarly using newer f:selectItems features don't seem to work. Such as:

      <ace:simpleSelectOneMenu value="#{bean.value}">
          <f:selectItems value="#{data.list}" var="loop" itemLabel="Custom #{loop}/>
      </ace:simpleSelectOneMenu>

      This should show "Custom #{loop}" as the label for each item, but the ace:simpleSelectOneMenu ignores the itemLabel attribute instead.

      Ideally ace:simpleSelectOneMenu would function, render, and process dropdowns the same as h:selectOneMenu, just with ICEfaces theming and options applied.

        Activity

        Repository Revision Date User Message
        ICEsoft Public SVN Repository #45036 Tue Jun 16 12:11:44 MDT 2015 art.zambrano ICE-10621 added complete processing of the f:selectItems tag, in order to support non-SelectItem lists and arrays as well as newer attributes
        Files Changed
        Commit graph MODIFY /icefaces4/trunk/icefaces/ace/component/src/org/icefaces/ace/component/simpleselectonemenu/SimpleSelectOneMenuRenderer.java
        Commit graph ADD /icefaces4/trunk/icefaces/ace/component/src/org/icefaces/ace/util/SelectItemsIterator.java
        Commit graph MODIFY /icefaces4/trunk/icefaces/ace/component/src/org/icefaces/ace/component/simpleselectonemenu/SimpleSelectOneMenu.java
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #45039 Tue Jun 16 13:01:58 MDT 2015 carlo.guglielmin With the fix of ICE-10621 all h:selectOneMenu components could be safely switched to ace:simpleSelectOneMenu, since it works properly with f:selectItems looping now
        Files Changed
        Commit graph MODIFY /icefaces4/trunk/icefaces/samples/ace/emporium/src/main/webapp/resources/components/chat.xhtml
        Commit graph MODIFY /icefaces4/trunk/icefaces/samples/ace/emporium/src/main/webapp/WEB-INF/includes/settings-tab.xhtml
        Commit graph MODIFY /icefaces4/trunk/icefaces/samples/ace/emporium/src/main/webapp/WEB-INF/includes/post-tab.xhtml

          People

          • Assignee:
            Arturo Zambrano
            Reporter:
            Carlo Guglielmin
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: