Wicket
  1. Wicket
  2. WICKET-3800

StatelessForm + IndexedParamUrlCodingStrategy: URL path params are not url-encoded

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.4.17
    • Fix Version/s: 1.5.0
    • Component/s: wicket
    • Labels:
      None
    • Environment:
      embedded jetty, glassfish 3.1

      Description

      When using a StatelessForm on a page mounted with IndexedParamUrlCodingStrategy/MixedParamUrlCodingStrategy, parameters added to the URL path are not url-encoded.

      It's actually coming from RequestCycle.urlFor(). There is a note on line 917 of that file indicating "Do not encode values here. It is the encoder's job to do the endoding". So perhaps I'm doing something wrong, but I'm surprised to see different behavior when the form is stateless.

      Another user reported what I believe is probably the same issue here:
      http://apache-wicket.1842946.n4.nabble.com/StatelessForm-problem-Not-all-parameters-were-encoded-td1887698.html

      In that thread Igor responded "forms do not support indexed strategies since they need actual parameternames", which frankly, I do not understand. I'm adding parameters like:

      PageParameters params = new PageParameters();
      params.add("0", input0.getModelObject());
      setResponsePage(HomePage.class, params);

      and I assume that "0" qualifies as a named parameter.

      I will attach a quickstart to demonstrate.

      1. stateless-form-bug-1.5.tgz
        5 kB
        Martin Grigorov
      2. stateless-form-bug.tar.gz
        4 kB
        George Armhold

        Activity

        George Armhold created issue -
        George Armhold made changes -
        Field Original Value New Value
        Attachment stateless-form-bug.tar.gz [ 12482688 ]
        Martin Grigorov made changes -
        Attachment stateless-form-bug-1.5.tgz [ 12483591 ]
        Martin Grigorov made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Fix Version/s 1.5.0 [ 12315432 ]
        Resolution Fixed [ 1 ]

          People

          • Assignee:
            Unassigned
            Reporter:
            George Armhold
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development