Uploaded image for project: 'Wicket'
  1. Wicket
  2. WICKET-3438

2xStatelessForm growing url when there is error validation

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 1.4.15
    • 1.4.16
    • wicket
    • None

    Description

      Hello,

      I have a strange problem with 2xStatelessForm :

      I would like a stateless application with 2 StatelessForm and with somes required validators on form :

      public class HomePage extends WebPage {

      private static final long serialVersionUID = 1L;

      public HomePage(final PageParameters parameters) {
      super(parameters);
      setVersioned(false);
      Form form1 = new StatelessForm("form1") {
      @Override
      protected void onSubmit()

      { setResponsePage(ResultPage.class); }
      };
      form1.add(new TextField<String>("input1").setRequired(true));
      add(form1);

      Form form2 = new StatelessForm("form2") {
      @Override
      protected void onSubmit() { setResponsePage(ResultPage.class); }

      };
      form2.add(new TextField<String>("input1").setRequired(true));
      add(form2);
      }
      }

      The problem is when I submit alternatively each form (I don't fill the Textfield required intentionally), the url growing like this :

      1st submit : http://localhost:8080/Wicket-Test/HomePage.html?wicket:interface=:0:form2::IFormSubmitListener::
      2nd submit : http://localhost:8080/Wicket-Test/HomePage.html?form22_hf_0=&wicket:interface=:0:form1::IFormSubmitListener::
      3th submit : http://localhost:8080/Wicket-Test/HomePage.html?form22_hf_0=&form12_hf_0=&wicket:interface=:0:form2::IFormSubmitListener::
      4th submit : http://localhost:8080/Wicket-Test/HomePage.html?form22_hf_0=&form22_hf_0=&form12_hf_0=&wicket:interface=:0:form1::IFormSubmitListener::
      ...

      Is there a solution to solve this problem ?

      Best regards

      Duto

      Attachments

        1. Wicket-test.rar
          6 kB
          Duto
        2. WICKET-3438.patch
          11 kB
          Pedro Santos
        3. WICKET-3438-nested-forms.patch
          6 kB
          Pedro Santos
        4. WICKET-3438.zip
          13 kB
          Pedro Santos

        Issue Links

          Activity

            People

              ivaynberg Igor Vaynberg
              dutrieux Duto
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: