ICEfaces
  1. ICEfaces
  2. ICE-10216

ace:autoCompleteEntry selectItems using label instead of value

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 4.0.BETA
    • Fix Version/s: 4.1
    • Component/s: ACE-Components
    • Labels:
      None
    • Environment:
      Tomcat 7

      Description

      I created an array of SelectItem objects and bound it to the ace:autoCompleteEntry component like this:

                  <ace:autoCompleteEntry value="#{navigationModel.searchValue}"
                                         valueChangeListener="#{navigationController.navigate}"
                                         placeholder="Search"
                                         filterMatchMode="contains"
                                         width="180">
                      <f:selectItems value="#{navigationModel.currentComponentGroup.searchSelectItems}"/>
                  </ace:autoCompleteEntry>

      The event in the ValueChangeListener is returning the selected label as the new value, instead of the value used in creating the SelectItem object.

      The showcase uses a SelectItem constructor with a single parameter, the label that is used for label and value. We need it to work with the SelectItem constructors that also pass in a separate value.

        Activity

        Repository Revision Date User Message
        ICEsoft Public SVN Repository #45816 Tue Aug 04 11:23:41 MDT 2015 art.zambrano ICE-10216 fix to remove 'name' attribute when the inField label is on, in order to avoid submitting the label as the value when submitting the form from outside the component
        Files Changed
        Commit graph MODIFY /icefaces4/trunk/icefaces/ace/component/resources/icefaces.ace/autocompleteentry/autocompleteentry.js
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #45805 Wed Jul 29 17:29:38 MDT 2015 art.zambrano ICE-10216 modified ace:autoCompleteEntry to use the SelectItem's value as the actual value of the options in the popup list and the label as the text that actually gets displayed in the list
        Files Changed
        Commit graph MODIFY /icefaces4/trunk/icefaces/ace/component/resources/icefaces.ace/autocompleteentry/autocompleteentry.js
        Commit graph MODIFY /icefaces4/trunk/icefaces/ace/component/src/org/icefaces/ace/component/autocompleteentry/AutoCompleteEntryRenderer.java

          People

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

            Dates

            • Created:
              Updated:
              Resolved: