You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Igor Vaynberg (JIRA)" <ji...@apache.org> on 2011/02/20 23:50:38 UTC

[jira] Resolved: (WICKET-3418) Incorrect setting of AjaxSubmitLink's request parameter in BaseWicketTester.submitAjaxFormSubmitBehavior

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

Igor Vaynberg resolved WICKET-3418.
-----------------------------------

       Resolution: Fixed
    Fix Version/s: 1.4.16

committed patch

> Incorrect setting of AjaxSubmitLink's request parameter in BaseWicketTester.submitAjaxFormSubmitBehavior
> --------------------------------------------------------------------------------------------------------
>
>                 Key: WICKET-3418
>                 URL: https://issues.apache.org/jira/browse/WICKET-3418
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.4.15
>            Reporter: Szádeczky-Kardoss Szabolcs
>            Assignee: Pedro Santos
>            Priority: Minor
>             Fix For: 1.4.16
>
>         Attachments: WICKET-3418.patch
>
>
> In BaseWicketTester.submitAjaxFormSubmitBehavior() the AjaxSubmitLink's name is set in the request parameters as follows:
> (1)  Map<String, String[]> requestParams = getParametersForNextRequest();
>       requestParams.put(inputName, new String[] { "x" });
> However, as far as I could check MockWebApplication's.parametersForNextRequest is only put into the actual request when setupRequestAndResponse() is called. Since in clickLink()
> (2)  WebRequestCycle requestCycle = setupRequestAndResponse(true);
>       submitAjaxFormSubmitBehavior(linkComponent, ajaxFormSubmitBehavior);
> setupRequestAndResponse() precedes the submitAjaxFormSubmitBehavior() this won't happen in the current request any more and the Ajax submit is not processed correctly in the current request and also causes side effects for the next form submit (ajax or normal).
> To solve it either replace (1) with:
>   getServletRequest().setParameter(inputName, new String[] { "x" });
> or change the order of the two lines in (2).

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