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

CLONE -Wicket-autocomplete.js does not invoke invokePostCallHandlers() when input string is 0 lenght or null

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 1.3.5
    • Fix Version/s: 1.4-RC2
    • Component/s: wicket-extensions
    • Labels:
      None
    • Environment:
      ie6 or ff3

      Description

      when AutoCompleteTextField is reset to a 0 length input String (using backspace for exemple) Wicket.Ajax.invokePostCallHandlers(); is not invoke. it is a problem cause Wicket.Ajax.registerPreCallHandler is called.

      when these events are used to show ajax busy indicator for exemple, it stay on busy state.

      i think that
      (solution 1) pre and post should be called on 0 input string length call
      or
      (solution 2) pre and post should not be called (there is no ajax call after all)

      but not pre called et not post.

      for case 1 (pre and post, it can be fixed quickly in wicket-autocomplete.js function doUpdateChoices(resp)

      adding

      if ((Wicket.Focus.getFocusedElement() != input) || !cfg.showListOnEmptyInput && (input.value==null || input.value=="")) {
      hideAutoComplete();
      Wicket.Ajax.invokePostCallHandlers(); // line to be added
      return;
      }

      i don't have enought insight in wicket-ajax for proposing a fix for solution 2

      thanx

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                jdonnerstag Juegen Donnerstag
                Reporter:
                fkleinko Frank Klein Koerkamp
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: