title: How to populate Yii2 Autocomplete with AJAX call
body: <p>I am trying to switch to Yii2 from Yii 1.1. This was source attribute of TextAreaJuiAutoComplete widget</p>
  
  <pre><code>'source'=&gt;"js:function(request, response) {
      $.getJSON('".$url"', {
          term: extractLast(request.term)
      }, response);
  }",
  </code></pre>
  
  <p>This is not working in Yii2 with yii\jui\AutoComplete anymore. Can anyone give me a hint what is the cause? Underlying JavaScript objects should be the same.</p>
  
  <p>If I put following code it works, but I want to use ajax calls instead.</p>
  
  <pre><code>'source' =&gt; [ "c++", "java", "php", "coldfusion", "javascript", "asp", "ruby" ],
  </code></pre>