JS syntax error in Tapestry.ajaxRequest() when Ajax fails
---------------------------------------------------------

                 Key: TAP5-1706
                 URL: https://issues.apache.org/jira/browse/TAP5-1706
             Project: Tapestry 5
          Issue Type: Bug
          Components: tapestry-core
    Affects Versions: 5.3, 5.2.6
            Reporter: Steve Eynon
            Priority: Minor


In tapestry.js the JS Tapestry.ajaxRequest() method accesses the finalOptions 
variable incorrectly. 

It is a prototype $H Hash, not an array, and so must be accessed as such:

    finalOptions.toObject().onFailure.call(this, response);

and not

 finalOptions.onFailure.call(this, response);

Attached is a patch for this...

...although looking at the docs - http://api.prototypejs.org/language/dollar-H/ 
- a more optimal approach may be

    finalOptions.get('onFailure').call(this, response);



--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to