1. Wicket
  2. WICKET-828

Using form method=get does not work


    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.2.6, 1.3.0-beta2
    • Fix Version/s: 1.2.7, 1.3.0-beta3
    • Component/s: None
    • Labels:
    • Environment:


      I'm trying to use form method="get" instead of post. In wicket 1.3.0-beta2 I override the getMethod() in Form to return METHOD_GET instead of the default METHOD_POST. In wicket 1.2.6 I do like this:
      Form form = new Form("form") {
      protected void onComponentTag(ComponentTag tag)

      { super.onComponentTag(tag); tag.put("method", "get"); }


      Both of these options seems to work as far as rendering the html page is concerned but you cannot submit anything. But when submitting a request all that's happening is that the navigation bar displays the URL in the form of e.g. http://localhost:8080/wickettest/app/?form0_hf_0=&firstName=johan&lastName=haleby&button=Submit+Query . I.e. all wicket component navigation info seems to be lost and wicket cannot determine the IFormListener and instead
      defaults to the HomePage.

      Also one thing that may be addressed is that if you have declared a form in your html as e.g.
      <form wicket:id="form" method="get">
      the method should not automatically be transformed to post. Or perhaps there is a reason for doing this that I'm not aware of.


        Johan Haleby created issue -
        Eelco Hillenius added a comment - See http://www.nabble.com/How-to-use-form-method%3D%22get%22--tf4229581.html#a12032581
        Eelco Hillenius made changes -
        Field Original Value New Value
        Assignee Eelco Hillenius [ ehillenius ]
        Eelco Hillenius made changes -
        Fix Version/s 1.2.7 [ 12312468 ]
        Resolution Fixed [ 1 ]
        Status Open [ 1 ] Resolved [ 5 ]
        Fix Version/s 1.3.0-beta3 [ 12312533 ]
        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open Resolved Resolved
        4d 13h 43m 1 Eelco Hillenius 12/Aug/07 21:59


          • Assignee:
            Eelco Hillenius
            Johan Haleby
          • Votes:
            0 Vote for this issue
            0 Start watching this issue


            • Created: