docs: function (res, args) {
  
                  this._pendingRequestNb -= 1;
  
                  var suggestions = null;
                  var error = null;
                  var repositionDropDown = false;
                  if (res != null) {
                      if ("suggestions" in res) {
                          suggestions = res.suggestions;
                          error = res.error;
                          repositionDropDown = res.repositionDropDown;
                      } else {
                          suggestions = res;
                      }
                  }
  
                  // default selection is first element
                  var nextValue = args.nextValue, triggerDropDown = args.triggerDropDown, matchValueIndex = -1, dataModel = this._dataModel;
  
                  // don't do anything if displayedValue has changed
                  // -> user has typed something else before the callback returned
                  if (dataModel && (nextValue == dataModel.text) || (args.keepSelectedValue)) {
  
                      // a null return is different from an empty array
                      // null : not enought letters
                      // empty array : no suggestions for this entry
                      var suggestionsAvailable = (suggestions !== null);
  
                      if (suggestionsAvailable) {
                          if (args.keepSelectedValue) {
                              var code = dataModel.value ? dataModel.value.code : null;
                              for (var i = 0; i < suggestions.length; i += 1) {
                                  suggestions[i].exactMatch = (suggestions[i].code === code);
                              }
                          }
                          // reformat the suggestions to be compatible with the list widget
                          matchValueIndex = this._prepareSuggestionsAndMatch(suggestions, nextValue);
  
                      } else {
                          suggestions = [];
                      }
                      var hasSuggestions = suggestions.length > 0;
                      // for resetting focus when suggestions are empty
                      this._resetFocus = suggestions.length > 0 || !(this.expandButton);
                      ariaTemplatesRefreshManager.stop();
                      // as item are changed, force datamodel to change to activate selection
                      var jsonUtils = ariaUtilsJson;
                      jsonUtils.setValue(dataModel, 'selectedIdx', -1);
  
                      // update datamodel through setValue to update the list has well
                      jsonUtils.setValue(dataModel, 'listContent', suggestions);
                      jsonUtils.setValue(dataModel, 'selectedIdx', matchValueIndex);
  
                      var report = new ariaWidgetsControllersReportsDropDownControllerReport();
                      if (!args.avoidChangingText) {
                          report.text = nextValue;
                          report.caretPosStart = args.caretPosStart;
                          report.caretPosEnd = args.caretPosEnd;
                      }
  
                      if (matchValueIndex != -1) {
                          dataModel.value = dataModel.listContent[matchValueIndex].value;
                      } else {
                          if (this.freeText && nextValue) {
                              // return the text from the autocomplete
                              dataModel.value = nextValue;
                          } else {
                              dataModel.value = null;
                          }
                      }
  
                      report.value = dataModel.value;
                      report.cancelKeyStroke = true;
  
                      if (error != null) {
                          report.ok = !error;
                      } else {
                          if (!this.freeText && suggestionsAvailable && !hasSuggestions) {
                              report.ok = false;
                              report.errorMessages.push(this.getErrorMessage("validation"));
                          } else {
                              report.ok = true;
                          }
                      }
                      if (report.ok && suggestionsAvailable && !hasSuggestions) {
                          dataModel.value = nextValue;
                      }
                      report.displayDropDown = hasSuggestions && triggerDropDown;
                      report.repositionDropDown = repositionDropDown;
                      var arg = {};
                      arg.stopValueProp = true;
                      this._raiseReport(report, arg);
                      ariaTemplatesRefreshManager.resume();
                  }
              }