[ 
https://issues.apache.org/jira/browse/WICKET-3438?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Igor Vaynberg resolved WICKET-3438.
-----------------------------------

       Resolution: Fixed
    Fix Version/s: 1.4.16
         Assignee: Igor Vaynberg

there is a small problem with the patch. form id may not be unique for embedded 
forms. however, this is highly unlikely - two forms where one is embedded in 
another or both are embedded sharing the same id. still, a better approach may 
be to use the page-relative path to the form as the id. committing the patch 
for now, pedro if you have time can you tweak it?

> 2xStatelessForm growing url when there is error validation 
> -----------------------------------------------------------
>
>                 Key: WICKET-3438
>                 URL: https://issues.apache.org/jira/browse/WICKET-3438
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.4.15
>            Reporter: Olivier Dutrieux
>            Assignee: Igor Vaynberg
>             Fix For: 1.4.16
>
>         Attachments: WICKET-3438.patch, Wicket-test.rar
>
>
> 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

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to