Wicket
  1. Wicket
  2. WICKET-3938

Impossible to remove particular key-value from PageParameters

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.5-RC5.1
    • Fix Version/s: 1.5.1
    • Component/s: wicket
    • Environment:
      not important

      Description

      There is no way to delete particular key-value from page parameters.
      Example:
      PageParameters parameters = new PageParameters("key1=value1,key1=value2"); //just to demonstrate, but actuall parameters comes from get request
      imposible to remove value1 from parameters.
      Workaround - create new PageParameters with filtering by key and value.

      1. patch-3938.diff
        0.8 kB
        Bruno Borges

        Activity

        Hide
        Igor Azarny added a comment -

        Looks good

        Show
        Igor Azarny added a comment - Looks good
        Hide
        Martin Grigorov added a comment -

        A new method was introduced (#remove(String name, String... values)) because otherwise a binary incompatible change was introduced and can break applications if they are not recompiled.
        See http://markmail.org/thread/qhmqvegb5yekzf3h for more info.
        #remove(String) is scheduled for removal in next major version of Wicket.

        Show
        Martin Grigorov added a comment - A new method was introduced (#remove(String name, String... values)) because otherwise a binary incompatible change was introduced and can break applications if they are not recompiled. See http://markmail.org/thread/qhmqvegb5yekzf3h for more info. #remove(String) is scheduled for removal in next major version of Wicket.
        Hide
        Igor Azarny added a comment -

        Yes, Peter, you are correct.

        Show
        Igor Azarny added a comment - Yes, Peter, you are correct.
        Hide
        Peter Ertl added a comment -

        I think he meant to remove 'value1' from multi-value 'key1' so that key1='value2' will be left

        Show
        Peter Ertl added a comment - I think he meant to remove 'value1' from multi-value 'key1' so that key1='value2' will be left
        Hide
        Bruno Borges added a comment -

        Ticket invalid.

        Removing parameters is working.

        Added a testcase for removing parameters. See patch

        Show
        Bruno Borges added a comment - Ticket invalid. Removing parameters is working. Added a testcase for removing parameters. See patch

          People

          • Assignee:
            Martin Grigorov
            Reporter:
            Igor Azarny
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Time Tracking

              Estimated:
              Original Estimate - 2h
              2h
              Remaining:
              Remaining Estimate - 2h
              2h
              Logged:
              Time Spent - Not Specified
              Not Specified

                Development