/**
  * Set the data binder for ajax filtering
  * 
  * Call this at creation time to set the data binder of the item list you will display. The data binder 
  * will be an AjaxAction function, and so will receive the following parameters:
  * - FormId
  * - ControlId
  * - Parameter
  * The Parameter in particular will be the term that you should use for filtering. There are situations
  * where the term will not be the same as the contents of the field.
  *
  * @param string         $strMethodName    Name of the method which has to be bound
  * @param QForm|QControl $objParentControl The parent control on which the action is to be bound
  * @param bool           $blnReturnTermAsParameter Return the terms as a parameter to the handler
  */
 public function SetDataBinder($strMethodName, $objParentControl = null, $blnReturnTermAsParameter = false)
 {
     $strJsReturnParam = '';
     $strBody = '';
     if ($this->MultipleValueDelimiter) {
         $strJsReturnParam = 'this.element.data("curTerm")(this.element.get(0))';
     } else {
         $strJsReturnParam = 'request.term';
     }
     if ($objParentControl) {
         $objAction = new QAjaxControlAction($objParentControl, $strMethodName, 'default', null, $strJsReturnParam);
     } else {
         $objAction = new QAjaxAction($strMethodName, 'default', null, $strJsReturnParam);
     }
     // use the ajax action to generate an ajax script for us, but
     // since this is an option of the control, we can't actually 'bind' it, so we instead use an
     // empty action to tie the action to the data binder method name
     $objEvent = new QAutocomplete_SourceEvent();
     $objAction->Event = $objEvent;
     $strBody = 'this.response = response;';
     // response is a javascript closure, and we have to save it to use it later.
     $strBody .= $objAction->RenderScript($this);
     $this->mixSource = new QJsClosure($strBody, array('request', 'response'));
     $this->RemoveAllActions(QAutocomplete_SourceEvent::EventName);
     $objAction = new QNoScriptAjaxAction($objAction);
     parent::AddAction($objEvent, $objAction);
     $this->blnUseAjax = true;
     $this->blnModified = true;
 }