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

Error "source is not defined" after richfaces-jsf-event.js merge

    Details

    • Sprint:
      4.3.2 Sprint 1
    • Steps to Reproduce:
      Hide

      Locate the id of a <form> of your choice and manually execute the following JavaScript function call:

      jsf.ajax.request("MyContainer:MySelectionForm", "valueChange", {});
      
      Show
      Locate the id of a <form> of your choice and manually execute the following JavaScript function call: jsf.ajax.request( "MyContainer:MySelectionForm" , "valueChange" , {});

      Description

      Commit 9255380d626227d909bbcd59ea3bc604966ea5bb breaks the following jsf.ajax.request:

      jsf.ajax.request("MyContainer:MySelectionForm", "valueChange", {});
      

      In <a4j:log/> the following error is displayed:

      richfaces.queue: ajax submit error: source is not defined
      

      After inspecting richfaces.js I located the cause of the error:

      var getFormElement = function(sourceElement) {
        if ($(sourceElement).is('form')) {
          return source;
        } else {
          return $('form').has(sourceElement).get(0);
        }
      }; 
      

      First if-statement evaluates to true, returning source, which itself is not defined:

      ReferenceError: source is not defined
      

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                lfryc Lukáš Fryč
                Reporter:
                tgreiser Torben Greiser
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - 2 hours
                  2h
                  Remaining:
                  Remaining Estimate - 2 hours
                  2h
                  Logged:
                  Time Spent - Not Specified
                  Not Specified