Tapestry 5
  1. Tapestry 5
  2. TAP5-1706

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

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 5.3, 5.2.6
    • Fix Version/s: 5.3
    • Component/s: tapestry-core
    • Labels:
      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);

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

        Activity

        Hide
        Steve Eynon added a comment -

        The patch for tapestry.js

        Show
        Steve Eynon added a comment - The patch for tapestry.js
        Hide
        Hudson added a comment -

        Integrated in tapestry-trunk-freestyle #590 (See https://builds.apache.org/job/tapestry-trunk-freestyle/590/)
        TAP5-1706: JS syntax error in Tapestry.ajaxRequest() when Ajax fails

        hlship : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1186341
        Files :

        • /tapestry/tapestry5/trunk/tapestry-core/src/main/resources/org/apache/tapestry5/tapestry.js
        Show
        Hudson added a comment - Integrated in tapestry-trunk-freestyle #590 (See https://builds.apache.org/job/tapestry-trunk-freestyle/590/ ) TAP5-1706 : JS syntax error in Tapestry.ajaxRequest() when Ajax fails hlship : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1186341 Files : /tapestry/tapestry5/trunk/tapestry-core/src/main/resources/org/apache/tapestry5/tapestry.js

          People

          • Assignee:
            Howard M. Lewis Ship
            Reporter:
            Steve Eynon
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development