Velocity Tools
  1. Velocity Tools
  2. VELTOOLS-89

LinkTool's addQueryData method should automatically add an 'ignore' so addAllParameters will ignore manually-added query data

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Trivial Trivial
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.x, 1.4, 2.x
    • Component/s: VelocityView
    • Labels:
      None

      Description

      Currently, the LinkTool requires that, for each parameter you intend to override from the current request (when using addAllParameters), you do something like this:

      $link.addIgnore("foo").addQueryData("foo", "bar").addAllParameters()

      It is almost always the case that the "foo" parameter should be ignored from the current request because it's value is being explicitly set by the addQueryData call.

      This should be the default behavior, with the current behavior being configurable via the toolbox setup.

      1. VELTOOLS-89.diff
        15 kB
        Christopher Schultz

        Activity

        Hide
        Nathan Bubna added a comment -

        thanks!

        Show
        Nathan Bubna added a comment - thanks!
        Hide
        Christopher Schultz added a comment -

        (Patch is relative to the trunk, btw)

        Show
        Christopher Schultz added a comment - (Patch is relative to the trunk, btw)
        Hide
        Christopher Schultz added a comment -

        This patch adds to LinkTool:

        • Automatic additions of parameter names to ignore list when addQueryData is called (really copyWith)
        • Config parameter to enable auto-ignore
        • getKey method to QueryPair class
        • More unit tests

        This patch changes:

        • Default is now auto-ignore (was not to auto-ignore with last patch)
        • Ignore list is now a Set to prevent duplicates and speed up searches
        Show
        Christopher Schultz added a comment - This patch adds to LinkTool: Automatic additions of parameter names to ignore list when addQueryData is called (really copyWith) Config parameter to enable auto-ignore getKey method to QueryPair class More unit tests This patch changes: Default is now auto-ignore (was not to auto-ignore with last patch) Ignore list is now a Set to prevent duplicates and speed up searches

          People

          • Assignee:
            Unassigned
            Reporter:
            Christopher Schultz
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development