You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Pedro Santos (JIRA)" <ji...@apache.org> on 2010/12/18 18:58:00 UTC

[jira] Created: (WICKET-3272) Set an request parameter on Wicket tester do not add it in the request URL

Set an request parameter on Wicket tester do not add it in the request URL
--------------------------------------------------------------------------

                 Key: WICKET-3272
                 URL: https://issues.apache.org/jira/browse/WICKET-3272
             Project: Wicket
          Issue Type: Bug
          Components: wicket
    Affects Versions: 1.5-M3
            Reporter: Pedro Santos


When submitting an form, the parameters set in request do not get appended to the URL query string.
Initial impression is that UrlRender should append query parameters in the base URL on relatives URL.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (WICKET-3272) Set an request parameter on Wicket tester do not add it in the request URL

Posted by "Pedro Santos (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-3272?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12974893#action_12974893 ] 

Pedro Santos commented on WICKET-3272:
--------------------------------------

Thank u Martin, your implementation is more robust, we should use it.
I want to review the parameters restoration in MockHttpServletRequest to
don't miss any multi valuated query parameter, and create an test case for
this situation also.





-- 
Pedro Henrique Oliveira dos Santos


> Set an request parameter on Wicket tester do not add it in the request URL
> --------------------------------------------------------------------------
>
>                 Key: WICKET-3272
>                 URL: https://issues.apache.org/jira/browse/WICKET-3272
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.5-M3
>            Reporter: Pedro Santos
>         Attachments: WICKET-3272-AbstractComponentMapper.patch, WICKET-3272-test-fix.patch
>
>
> When submitting an form, the parameters set in request do not get appended to the URL query string.
> Initial impression is that UrlRender should append query parameters in the base URL on relatives URL.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (WICKET-3272) Set an request parameter on Wicket tester do not add it in the request URL

Posted by "Martin Grigorov (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-3272?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Martin Grigorov updated WICKET-3272:
------------------------------------

    Attachment: WICKET-3272-AbstractComponentMapper.patch

Here is improved version of your improvement in AbstractComponentMapper.
This way we will try all parameters without value when trying to create PageComponentInfo.

> Set an request parameter on Wicket tester do not add it in the request URL
> --------------------------------------------------------------------------
>
>                 Key: WICKET-3272
>                 URL: https://issues.apache.org/jira/browse/WICKET-3272
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.5-M3
>            Reporter: Pedro Santos
>         Attachments: WICKET-3272-AbstractComponentMapper.patch, WICKET-3272-test-fix.patch
>
>
> When submitting an form, the parameters set in request do not get appended to the URL query string.
> Initial impression is that UrlRender should append query parameters in the base URL on relatives URL.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (WICKET-3272) Set an request parameter on Wicket tester do not add it in the request URL

Posted by "Pedro Santos (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-3272?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Pedro Santos updated WICKET-3272:
---------------------------------

    Attachment: WICKET-3272-test-fix.patch

Problem 1: AbstractComponentMapper is relying on the fact that the first query parameters is the one that will correctly resolve the PageComponentInfo. It is not a good idea to trust on this sequence since the ULR query parameters string can be assembled in a different way.
Problem 2: MockHttpServletRequest is losing the query parameters set by WicketTester user when set an URL. Users parameters set on request to be tested should be maintained since their tests can depend on it.

Maybe those problems are not rely a problem. But if so, how can those tests attached work?

> Set an request parameter on Wicket tester do not add it in the request URL
> --------------------------------------------------------------------------
>
>                 Key: WICKET-3272
>                 URL: https://issues.apache.org/jira/browse/WICKET-3272
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.5-M3
>            Reporter: Pedro Santos
>         Attachments: WICKET-3272-test-fix.patch
>
>
> When submitting an form, the parameters set in request do not get appended to the URL query string.
> Initial impression is that UrlRender should append query parameters in the base URL on relatives URL.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (WICKET-3272) Set an request parameter on Wicket tester do not add it in the request URL

Posted by "Pedro Santos (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-3272?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Pedro Santos resolved WICKET-3272.
----------------------------------

       Resolution: Fixed
    Fix Version/s: 1.5-M4
         Assignee: Pedro Santos

committed with the StringValue#equals changed to test the text and locale

> Set an request parameter on Wicket tester do not add it in the request URL
> --------------------------------------------------------------------------
>
>                 Key: WICKET-3272
>                 URL: https://issues.apache.org/jira/browse/WICKET-3272
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.5-M3
>            Reporter: Pedro Santos
>            Assignee: Pedro Santos
>             Fix For: 1.5-M4
>
>         Attachments: WICKET-3272-AbstractComponentMapper.patch, WICKET-3272-test-fix-2.patch, WICKET-3272-test-fix.patch
>
>
> When submitting an form, the parameters set in request do not get appended to the URL query string.
> Initial impression is that UrlRender should append query parameters in the base URL on relatives URL.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (WICKET-3272) Set an request parameter on Wicket tester do not add it in the request URL

Posted by "Martin Grigorov (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-3272?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12977183#action_12977183 ] 

Martin Grigorov commented on WICKET-3272:
-----------------------------------------

The new patch looks OK.
Just StringValue#equals() I think is not correct. It should not depend on StringValue#hashCode(). Hashcode collisions are not something uncommon. Better directly check for equality the locale and the text.

> Set an request parameter on Wicket tester do not add it in the request URL
> --------------------------------------------------------------------------
>
>                 Key: WICKET-3272
>                 URL: https://issues.apache.org/jira/browse/WICKET-3272
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.5-M3
>            Reporter: Pedro Santos
>         Attachments: WICKET-3272-AbstractComponentMapper.patch, WICKET-3272-test-fix-2.patch, WICKET-3272-test-fix.patch
>
>
> When submitting an form, the parameters set in request do not get appended to the URL query string.
> Initial impression is that UrlRender should append query parameters in the base URL on relatives URL.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (WICKET-3272) Set an request parameter on Wicket tester do not add it in the request URL

Posted by "Pedro Santos (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-3272?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Pedro Santos updated WICKET-3272:
---------------------------------

    Attachment: WICKET-3272-test.patch

> Set an request parameter on Wicket tester do not add it in the request URL
> --------------------------------------------------------------------------
>
>                 Key: WICKET-3272
>                 URL: https://issues.apache.org/jira/browse/WICKET-3272
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.5-M3
>            Reporter: Pedro Santos
>         Attachments: WICKET-3272-test.patch
>
>
> When submitting an form, the parameters set in request do not get appended to the URL query string.
> Initial impression is that UrlRender should append query parameters in the base URL on relatives URL.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (WICKET-3272) Set an request parameter on Wicket tester do not add it in the request URL

Posted by "Pedro Santos (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-3272?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Pedro Santos updated WICKET-3272:
---------------------------------

    Attachment: WICKET-3272-test-fix-2.patch

I found another bug testing multi values query parameters: MockHttpServletRequest#getQueryString wasn't append more than one query parameter to the query string. Sending the patch again.
@Martin, setParameter when decoding an URL at MockHttpServletRequest#setURL was introducing the described bug also, thanks for notice!

> Set an request parameter on Wicket tester do not add it in the request URL
> --------------------------------------------------------------------------
>
>                 Key: WICKET-3272
>                 URL: https://issues.apache.org/jira/browse/WICKET-3272
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.5-M3
>            Reporter: Pedro Santos
>         Attachments: WICKET-3272-AbstractComponentMapper.patch, WICKET-3272-test-fix-2.patch, WICKET-3272-test-fix.patch
>
>
> When submitting an form, the parameters set in request do not get appended to the URL query string.
> Initial impression is that UrlRender should append query parameters in the base URL on relatives URL.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (WICKET-3272) Set an request parameter on Wicket tester do not add it in the request URL

Posted by "Pedro Santos (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-3272?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Pedro Santos updated WICKET-3272:
---------------------------------

    Attachment:     (was: WICKET-3272-test.patch)

> Set an request parameter on Wicket tester do not add it in the request URL
> --------------------------------------------------------------------------
>
>                 Key: WICKET-3272
>                 URL: https://issues.apache.org/jira/browse/WICKET-3272
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.5-M3
>            Reporter: Pedro Santos
>         Attachments: WICKET-3272-test-fix.patch
>
>
> When submitting an form, the parameters set in request do not get appended to the URL query string.
> Initial impression is that UrlRender should append query parameters in the base URL on relatives URL.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (WICKET-3272) Set an request parameter on Wicket tester do not add it in the request URL

Posted by "Martin Grigorov (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-3272?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12976540#action_12976540 ] 

Martin Grigorov commented on WICKET-3272:
-----------------------------------------

Pedro, I added the improvement in AbstractComponentMapper. Needed to touch this code when working on other issues.

> Set an request parameter on Wicket tester do not add it in the request URL
> --------------------------------------------------------------------------
>
>                 Key: WICKET-3272
>                 URL: https://issues.apache.org/jira/browse/WICKET-3272
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.5-M3
>            Reporter: Pedro Santos
>         Attachments: WICKET-3272-AbstractComponentMapper.patch, WICKET-3272-test-fix.patch
>
>
> When submitting an form, the parameters set in request do not get appended to the URL query string.
> Initial impression is that UrlRender should append query parameters in the base URL on relatives URL.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (WICKET-3272) Set an request parameter on Wicket tester do not add it in the request URL

Posted by "Martin Grigorov (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-3272?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12974705#action_12974705 ] 

Martin Grigorov commented on WICKET-3272:
-----------------------------------------

Patch review:
Do you really mean "set"Parameter() in MockHttpServletRequest ?
This way any parameter with more than one value will be lost all values but the last one.

> Set an request parameter on Wicket tester do not add it in the request URL
> --------------------------------------------------------------------------
>
>                 Key: WICKET-3272
>                 URL: https://issues.apache.org/jira/browse/WICKET-3272
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.5-M3
>            Reporter: Pedro Santos
>         Attachments: WICKET-3272-test-fix.patch
>
>
> When submitting an form, the parameters set in request do not get appended to the URL query string.
> Initial impression is that UrlRender should append query parameters in the base URL on relatives URL.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.