You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Szádeczky-Kardoss Szabolcs (JIRA)" <ji...@apache.org> on 2011/02/03 16:18:28 UTC
[jira] Created: (WICKET-3418) Incorrect setting of AjaxSubmitLink's
request parameter in BaseWicketTester.submitAjaxFormSubmitBehavior
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
Priority: Minor
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
[jira] Resolved: (WICKET-3418) Incorrect setting of
AjaxSubmitLink's request parameter in
BaseWicketTester.submitAjaxFormSubmitBehavior
Posted by "Igor Vaynberg (JIRA)" <ji...@apache.org>.
[ 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
[jira] Updated: (WICKET-3418) Incorrect setting of AjaxSubmitLink's
request parameter in BaseWicketTester.submitAjaxFormSubmitBehavior
Posted by "Pedro Santos (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/WICKET-3418?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Pedro Santos updated WICKET-3418:
---------------------------------
Attachment: WICKET-3418.patch
Sending the patch changing the setup order and removing asserting lines from AjaxSubmitLinkClickTest because wicket tester do not maintain request parameter between requests, even if they are originated by form components.
> 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
> 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
[jira] Issue Comment Edited: (WICKET-3418) Incorrect setting of
AjaxSubmitLink's request parameter in
BaseWicketTester.submitAjaxFormSubmitBehavior
Posted by "Pedro Santos (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/WICKET-3418?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12997222#comment-12997222 ]
Pedro Santos edited comment on WICKET-3418 at 2/20/11 10:01 PM:
----------------------------------------------------------------
Sending the patch changing the setup order and removing asserting lines from AjaxSubmitLinkClickTest because wicket tester do not maintain request parameter between requests, even if they would be originated by browser to form components on page.
was (Author: pedrosans):
Sending the patch changing the setup order and removing asserting lines from AjaxSubmitLinkClickTest because wicket tester do not maintain request parameter between requests, even if they are originated by form components.
> 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
> 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
[jira] Commented: (WICKET-3418) Incorrect setting of
AjaxSubmitLink's request parameter in
BaseWicketTester.submitAjaxFormSubmitBehavior
Posted by "Hudson (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/WICKET-3418?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12997247#comment-12997247 ]
Hudson commented on WICKET-3418:
--------------------------------
Integrated in Apache Wicket 1.4.x #454 (See [https://hudson.apache.org/hudson/job/Apache%20Wicket%201.4.x/454/])
> 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
[jira] Commented: (WICKET-3418) Incorrect setting of
AjaxSubmitLink's request parameter in
BaseWicketTester.submitAjaxFormSubmitBehavior
Posted by "Igor Vaynberg (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/WICKET-3418?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12997174#comment-12997174 ]
Igor Vaynberg commented on WICKET-3418:
---------------------------------------
perdo, ping
> 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
>
> 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
[jira] Assigned: (WICKET-3418) Incorrect setting of
AjaxSubmitLink's request parameter in
BaseWicketTester.submitAjaxFormSubmitBehavior
Posted by "Pedro Santos (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/WICKET-3418?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Pedro Santos reassigned WICKET-3418:
------------------------------------
Assignee: Pedro Santos
> 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
>
> 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
[jira] Commented: (WICKET-3418) Incorrect setting of
AjaxSubmitLink's request parameter in
BaseWicketTester.submitAjaxFormSubmitBehavior
Posted by "Pedro Santos (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/WICKET-3418?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12997219#comment-12997219 ]
Pedro Santos commented on WICKET-3418:
--------------------------------------
Szádeczky is right, we should set parameters for next request before setup the request and response object. Also submitAjaxFormSubmitBehavior can be renamed to: setupAjaxSubmitRequestParameters
> 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
>
> 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