Uploaded image for project: 'Wicket'
  1. Wicket
  2. WICKET-1717

AutoCompleteTextField using AjaxFormComponentUpdatingBehavior("onchange") executes twice when selection is made using arrow/enter keys

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Duplicate
    • 1.3.4
    • None
    • wicket-extensions
    • None
    • Windows: Fiefox 2.x/3.0, Opera 9.5 (Works properly in IE 6/7 and Safari 3.1.1)

    Description

      AutoCompleteTextField using AjaxFormComponentUpdatingBehavior("onchange") executes twice when selection is made using arrow/enter keys.

      <input wicket:id="name" id="test-me" type="text" size="140" />
      
      final List<String> choices = new ArrayList<String>();
      choices.add("one");
      choices.add("two");
      choices.add("three");
      final AutoCompleteTextField actf = new AutoCompleteTextField("test-me", new Model()) {
      	protected Iterator<String> getChoices(final String searchTextInput) {
      		return choices.iterator();
      	}
      };
      actf.add(new AjaxFormComponentUpdatingBehavior("onchange") {
      	protected void onUpdate(final AjaxRequestTarget target) {
      		// FIXME : executes twice
      		LOG.debug("Called");
      	}
      });
      

      Attachments

        Issue Links

          Activity

            People

              ivaynberg Igor Vaynberg
              whoover.nemours Will Hoover
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: