Tapestry 5
  1. Tapestry 5
  2. TAP5-863

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

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major 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
        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
        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.
        Howard M. Lewis Ship made changes -
        Status In Progress [ 3 ] Closed [ 6 ]
        Fix Version/s 5.2.0 [ 12314122 ]
        Resolution Fixed [ 1 ]
        Howard M. Lewis Ship made changes -
        Status Open [ 1 ] In Progress [ 3 ]
        Howard M. Lewis Ship made changes -
        Field Original Value New Value
        Assignee Howard M. Lewis Ship [ hlship ]
        Howard M. Lewis Ship created issue -

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development