ICEfaces
  1. ICEfaces
  2. ICE-9510

ace:selectMenu - not showing the selected item if the list contains one item

    Details

    • Assignee Priority:
      P1
    • Salesforce Case Reference:
    • Workaround Exists:
      Yes
    • Workaround Description:
      Hide
      Adding in a blank item so that there are more than 1 item in the list/selectItems will allow it to be shown as selected. For example:

                      <ace:selectMenu id="workaroundMenu"
                                      value="#{testBean.singleValue}"
                                      label="One Item:"
                                      labelPosition="left">
                          <f:selectItem itemLabel="First Item" itemValue="1"/>
                          <f:selectItem itemLabel="" itemValue="" itemDisabled="true"/>
                      </ace:selectMenu>
      Show
      Adding in a blank item so that there are more than 1 item in the list/selectItems will allow it to be shown as selected. For example:                 <ace:selectMenu id="workaroundMenu"                                 value="#{testBean.singleValue}"                                 label="One Item:"                                 labelPosition="left">                     <f:selectItem itemLabel="First Item" itemValue="1"/>                     <f:selectItem itemLabel="" itemValue="" itemDisabled="true"/>                 </ace:selectMenu>

      Description

      If an ace:selectMenu is displayed with only one item in the list and this item is pre-selected on the server side, the item isn't displayed as selected in the field.

      This isn't an issue if the backing list has many items.

        Activity

        Repository Revision Date User Message
        ICEsoft Public SVN Repository #37416 Wed Aug 14 16:16:56 MDT 2013 art.zambrano ICE-9510 fixed off-by-one error
        Files Changed
        Commit graph MODIFY /icefaces3/trunk/icefaces/ace/component/resources/icefaces.ace/selectmenu/selectmenu.js

          People

          • Assignee:
            Arturo Zambrano
            Reporter:
            Arran Mccullough
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: