Uploaded image for project: 'Tapestry 5'
  1. Tapestry 5
  2. TAP5-1706

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

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 5.3, 5.2.6
    • 5.3
    • tapestry-core
    • None

    Description

      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);

      Attachments

        1. t5-js-patch.txt
          1.0 kB
          Steve Eynon

        Activity

          People

            hlship Howard Lewis Ship
            slimerdude Steve Eynon
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: