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

        Arran Mccullough created issue -
        Arran Mccullough made changes -
        Field Original Value New Value
        Salesforce Case Reference 5007000000VGpb4AAD
        Hide
        Arran Mccullough added a comment -

        Attached test case source code and war file (ICEfaces jar feels need to be re-added to run).

        Show
        Arran Mccullough added a comment - Attached test case source code and war file (ICEfaces jar feels need to be re-added to run).
        Arran Mccullough made changes -
        Attachment Case12338Example.war [ 16280 ]
        Attachment Case12338Example.zip [ 16281 ]
        Arran Mccullough made changes -
        Attachment selectMenu-one-item-issue.jpg [ 16282 ]
        Arran Mccullough made changes -
        Workaround Description 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>
        Workaround Exists Yes [ 10007 ]
        Ken Fyten made changes -
        Assignee Arturo Zambrano [ artzambrano ]
        Fix Version/s EE-3.3.0.GA_P01 [ 11174 ]
        Fix Version/s 3.4 [ 10770 ]
        Assignee Priority P1 [ 10010 ]
        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
        Hide
        Arturo Zambrano added a comment -

        Committed fix to trunk at revision 37416 and to p01 tag at revision 37417.

        Fixed off-by-one error when going through the list of options for matching them against the set value.

        Show
        Arturo Zambrano added a comment - Committed fix to trunk at revision 37416 and to p01 tag at revision 37417. Fixed off-by-one error when going through the list of options for matching them against the set value.
        Arturo Zambrano made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Ken Fyten made changes -
        Fix Version/s 4.0 [ 11382 ]
        Ken Fyten made changes -
        Status Resolved [ 5 ] Closed [ 6 ]

          People

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

            Dates

            • Created:
              Updated:
              Resolved: