ICEfaces
  1. ICEfaces
  2. ICE-9754

Two autocompleteentry controls in a single form

    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:
      Liferay 6.1.2 on Tomcat 7.40, Java 7

      Description

      Consider the following snippet:

      <ice:form style="display: inline-block;width:100%">
          <ace:autoCompleteEntry
                  id="ace1"
                  textChangeListener="#{conceptListHandlerTest.textChanged}"
                  valueChangeListener="#{conceptListHandlerTest.valueChanged}"
                  listVar="item"
                  listValue="#{conceptListHandlerTest.selectTerms}"
                  filterBy="#{item.label}">
              <f:facet name="row">
                  <h:outputText value="#{item.label}"/>
              </f:facet>
          </ace:autoCompleteEntry>
          <ace:autoCompleteEntry
                  id="ace2"
                  textChangeListener="#{tagListHandlerTest.textChanged}"
                  valueChangeListener="#{tagListHandlerTest.valueChanged}"
                  listVar="item"
                  listValue="#{tagListHandlerTest.selectTerms}"
                  filterBy="#{item.label}">
              <f:facet name="row">
                  <h:outputText value="#{item.label}"/>
              </f:facet>
          </ace:autoCompleteEntry>
      </ice:form>

      On keypress in 'ace1' two things happen in the following order:
      1) firing "tagListHandlerTest.valueChanged" from ace2 (which is INCORRECT)
      2) firing "conceptListHandlerTest.textChanged" from ace1 (which is CORRECT)

      Prevent firing value change on other autocompleteentry components in the same form.

        Activity

        Hide
        Daniel Leon added a comment - - edited

        This doesn't happen only between 2 autocompleteEntry components.

        I tested a form with a 'autocompleteEntry' and a 'h:selectOneMenu' component and it has a similar behavior. The scenario is :
        1) Press key down / key up to select a value from the autocomplete list and press escape
        2) Go the 'selectOneMenu' and select one option.

        The autocomplete list for the 'autocompleteEntry' appears and stays visible until the focus goes to the autocomplete component and escape key is pressed.
        If 2 'autocompleteEntry' components and a 'selectOneMenu' are available, then the autocomplete lists will appear for both(if the autocomplete list has been visible for both components at least once).

        The same behavior is consistent with every component that offers a select option and one or more autocompleteEntry components.

        PS: I use icefaces 4.0.0 , java 8 and glassfish 4.1.

        Show
        Daniel Leon added a comment - - edited This doesn't happen only between 2 autocompleteEntry components. I tested a form with a 'autocompleteEntry' and a 'h:selectOneMenu' component and it has a similar behavior. The scenario is : 1) Press key down / key up to select a value from the autocomplete list and press escape 2) Go the 'selectOneMenu' and select one option. The autocomplete list for the 'autocompleteEntry' appears and stays visible until the focus goes to the autocomplete component and escape key is pressed. If 2 'autocompleteEntry' components and a 'selectOneMenu' are available, then the autocomplete lists will appear for both(if the autocomplete list has been visible for both components at least once). The same behavior is consistent with every component that offers a select option and one or more autocompleteEntry components. PS: I use icefaces 4.0.0 , java 8 and glassfish 4.1.
        Hide
        Daniel Leon added a comment -

        I tried in separate forms on the same page and the bug is reproducible.

        Show
        Daniel Leon added a comment - I tried in separate forms on the same page and the bug is reproducible.

          People

          • Assignee:
            Unassigned
            Reporter:
            Petr Kremen
          • Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated: