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

After refreshing an AutoCompleteTextField with Ajax, onclik events on suggest-list stops functioning

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 1.4-M2
    • 1.4-M3
    • wicket-extensions
    • None
    • Firefox 3, IE7

    Description

      When I refresh an AutoCompleteTextField using an ajax request, I cannot click anymore on the suggest list to select an element. Selecting with keyboard works fine.

      Tested with Firefox3, IE7.

      Can reproduce using this code :

      <input type="text" wicket:id="myField"/>
      <a wicket:id="myLink">MyAjaxLink</a>

      final AutoCompleteTextField myField = new AutoCompleteTextField(
      "myField") {
      private static final long serialVersionUID = 1L;

      @Override
      protected Iterator<String> getChoices(String input)

      { ArrayList arrayList = new ArrayList(); arrayList.add("test"); return arrayList.iterator(); }

      };
      myField.setOutputMarkupId(true);
      add(myField);

      final AjaxLink myLink = new AjaxLink("myLink") {
      @Override
      public void onClick(AjaxRequestTarget target)

      { target.addComponent(myField); }

      };
      add(myLink);

      This works fine before I click on the link, it is broken after.

      Attachments

        Activity

          People

            Unassigned Unassigned
            clemp6r Clément Plantier
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: