Uploaded image for project: 'RichFaces'
  1. RichFaces
  2. RF-13537

Autocomplete: onbegin attribute ignored

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: 4.3.5
    • Fix Version/s: 4.5.17
    • Component/s: None
    • Labels:
      None

      Description

      "onbegin" attribute of rich:autocomplete is always ignored!
      I suggest next fix:
      In file Autocomplete.js:

      var callAjax = function(event, callback) {
      ...
      this.isFirstAjax = false;
              //caution: JSF submits inputs with empty names causing "WARNING: Parameters: Invalid chunk ignored." in Tomcat log
              var params = {};
              params[this.id + ".ajax"] = "1";
      rf.ajax(this.id, event, {parameters: params, error: ajaxError, complete:ajaxSuccess});
      }
      

      for fixing, we must replace on

      var callAjax = function(event, callback) {
      ...
      this.isFirstAjax = false;
              //caution: JSF submits inputs with empty names causing "WARNING: Parameters: Invalid chunk ignored." in Tomcat log
              var params = {};
              params[this.id + ".ajax"] = "1";
      var parameters_extended = {parameters: params, error: ajaxError, complete:ajaxSuccess};
              if (this.options.onbegin != undefined) {
                  parameters_extended.begin = this.options.onbegin;
              }
              rf.ajax(this.id, event, parameters_extended);
      }
      

      I can create pull request if everything ok.

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  michpetrov Michal Petrov
                  Reporter:
                  alixey alexey plotnikov
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  6 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: