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

Tapestry.ajaxRequest is insufficient when doing extra, such as adding query parameters

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 5.2.0
    • Fix Version/s: 5.2.0
    • Component/s: tapestry-core
    • Labels:
      None

      Description

      The chief advantage of Tapestry.ajaxRequest is that it handles error & failure automatically. However, every time I write a new custom Ajax hook, I end up using Ajax.Request instead, because I need to specify query parameters. Having the ability to set Ajax.Request defaults (including query parameters) as part of the call to Tapestry.ajaxRequest would be very useful.

        Activity

        Hide
        hlship Howard M. Lewis Ship added a comment -

        Existing code continues to work as before. However, the second parameter can now be a Ajax.Request options object (with keys such as onSuccess and onFailure). Defaults for onException and onFaliure are provided, and onSuccess is re-written (wrapped with some extra Tapestry checks and exception reporting). Other keys, particularly parameters, are passed through as is.

        Show
        hlship Howard M. Lewis Ship added a comment - Existing code continues to work as before. However, the second parameter can now be a Ajax.Request options object (with keys such as onSuccess and onFailure). Defaults for onException and onFaliure are provided, and onSuccess is re-written (wrapped with some extra Tapestry checks and exception reporting). Other keys, particularly parameters, are passed through as is.

          People

          • Assignee:
            hlship Howard M. Lewis Ship
            Reporter:
            hlship Howard M. Lewis Ship
          • Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development