You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Michiel Leegwater (JIRA)" <ji...@apache.org> on 2010/10/12 16:09:33 UTC

[jira] Created: (WICKET-3102) WicketTester does not handle startPage(ITestPageSource) that contains a redirect/setResponsePage correctly

WicketTester does not handle startPage(ITestPageSource) that contains a redirect/setResponsePage correctly
----------------------------------------------------------------------------------------------------------

                 Key: WICKET-3102
                 URL: https://issues.apache.org/jira/browse/WICKET-3102
             Project: Wicket
          Issue Type: Bug
          Components: wicket
    Affects Versions: 1.4.12
            Reporter: Michiel Leegwater
             Fix For: 1.4.13


The WicketTester does not handle a call to startPage(ITestPageSource) that contains a redirect/setResponsePage correctly.

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


[jira] Commented: (WICKET-3102) WicketTester does not handle startPage(ITestPageSource) that contains a redirect/setResponsePage correctly

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

Pedro Santos commented on WICKET-3102:
--------------------------------------

Removing your redirect rule from the page constructor is not an workaround. Maybe put it on the onInitialize method is. But you can move it to the onConfigure, onBeforeRender, anywhere you prefer. If you leave it at the constructor, you will have to say on your page javadoc: don't invoke this page constructor at the setResponsePage parameters codification.

> WicketTester does not handle startPage(ITestPageSource) that contains a redirect/setResponsePage correctly
> ----------------------------------------------------------------------------------------------------------
>
>                 Key: WICKET-3102
>                 URL: https://issues.apache.org/jira/browse/WICKET-3102
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.4.12
>            Reporter: Michiel Leegwater
>             Fix For: 1.4.13
>
>         Attachments: IPageSourceTest2_error.zip, IPageTestSource_error.zip
>
>
> The WicketTester does not handle a call to startPage(ITestPageSource) that contains a redirect/setResponsePage correctly.

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


[jira] Issue Comment Edited: (WICKET-3102) WicketTester does not handle startPage(ITestPageSource) that contains a redirect/setResponsePage correctly

Posted by "Michiel Leegwater (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-3102?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12920913#action_12920913 ] 

Michiel Leegwater edited comment on WICKET-3102 at 10/14/10 6:11 AM:
---------------------------------------------------------------------

To summarize: The workaround is to use onInitialize() on the page and all parents and not setting any component inside the constructor.

      was (Author: leegwater):
    In the latest attachment the IPageSourceTest.java shows in 'testSucceedsNoBasePage' that this workaround works.
The test 'testFails' shows that also a parent that sets components inside the constructor fail a startPage(ITestPageSource).
This bug should still be considered a bug IMO. 

To summarize: The workaround is to use onInitialize() on the page and all parents and not setting any component inside the constructor.
  
> WicketTester does not handle startPage(ITestPageSource) that contains a redirect/setResponsePage correctly
> ----------------------------------------------------------------------------------------------------------
>
>                 Key: WICKET-3102
>                 URL: https://issues.apache.org/jira/browse/WICKET-3102
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.4.12
>            Reporter: Michiel Leegwater
>             Fix For: 1.4.13
>
>         Attachments: IPageSourceTest2_error.zip, IPageTestSource_error.zip
>
>
> The WicketTester does not handle a call to startPage(ITestPageSource) that contains a redirect/setResponsePage correctly.

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


[jira] Updated: (WICKET-3102) WicketTester does not handle startPage(ITestPageSource) that contains a redirect/setResponsePage correctly

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

Michiel Leegwater updated WICKET-3102:
--------------------------------------

    Attachment: IPageSourceTest2_error.zip

In the latest attachment the IPageSourceTest.java shows in 'testSucceedsNoBasePage' that this workaround works.
The test 'testFails' shows that also a parent that sets components inside the constructor fail a startPage(ITestPageSource).
This bug should still be considered a bug IMO.

> WicketTester does not handle startPage(ITestPageSource) that contains a redirect/setResponsePage correctly
> ----------------------------------------------------------------------------------------------------------
>
>                 Key: WICKET-3102
>                 URL: https://issues.apache.org/jira/browse/WICKET-3102
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.4.12
>            Reporter: Michiel Leegwater
>             Fix For: 1.4.13
>
>         Attachments: IPageSourceTest2_error.zip, IPageTestSource_error.zip
>
>
> The WicketTester does not handle a call to startPage(ITestPageSource) that contains a redirect/setResponsePage correctly.

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


[jira] Resolved: (WICKET-3102) WicketTester does not handle startPage(ITestPageSource) that contains a redirect/setResponsePage correctly

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

Martin Grigorov resolved WICKET-3102.
-------------------------------------

       Resolution: Invalid
    Fix Version/s: 1.5-M3

In constructor you should use org.apache.wicket.RestartResponseException instead of setResponsePage()+setRedirect(true);

> WicketTester does not handle startPage(ITestPageSource) that contains a redirect/setResponsePage correctly
> ----------------------------------------------------------------------------------------------------------
>
>                 Key: WICKET-3102
>                 URL: https://issues.apache.org/jira/browse/WICKET-3102
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.4.12
>            Reporter: Michiel Leegwater
>             Fix For: 1.4.13, 1.5-M3
>
>         Attachments: IPageSourceTest2_error.zip, IPageTestSource_error.zip
>
>
> The WicketTester does not handle a call to startPage(ITestPageSource) that contains a redirect/setResponsePage correctly.

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


[jira] Commented: (WICKET-3102) WicketTester does not handle startPage(ITestPageSource) that contains a redirect/setResponsePage correctly

Posted by "Michiel Leegwater (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-3102?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12920913#action_12920913 ] 

Michiel Leegwater commented on WICKET-3102:
-------------------------------------------

In the latest attachment the IPageSourceTest.java shows in 'testSucceedsNoBasePage' that this workaround works.
The test 'testFails' shows that also a parent that sets components inside the constructor fail a startPage(ITestPageSource).
This bug should still be considered a bug IMO. 

To summarize: The workaround is to use onInitialize() on the page and all parents and not setting any component inside the constructor.

> WicketTester does not handle startPage(ITestPageSource) that contains a redirect/setResponsePage correctly
> ----------------------------------------------------------------------------------------------------------
>
>                 Key: WICKET-3102
>                 URL: https://issues.apache.org/jira/browse/WICKET-3102
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.4.12
>            Reporter: Michiel Leegwater
>             Fix For: 1.4.13
>
>         Attachments: IPageSourceTest2_error.zip, IPageTestSource_error.zip
>
>
> The WicketTester does not handle a call to startPage(ITestPageSource) that contains a redirect/setResponsePage correctly.

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


[jira] Commented: (WICKET-3102) WicketTester does not handle startPage(ITestPageSource) that contains a redirect/setResponsePage correctly

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

Pedro Santos commented on WICKET-3102:
--------------------------------------

WicketTester will ultimately set the ITestPageSource page as the request cycle response page. How about coding your redirect rule in an onInitialize override method and to be sure that your response page will be the respected despite the page constructor caller logic?

> WicketTester does not handle startPage(ITestPageSource) that contains a redirect/setResponsePage correctly
> ----------------------------------------------------------------------------------------------------------
>
>                 Key: WICKET-3102
>                 URL: https://issues.apache.org/jira/browse/WICKET-3102
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.4.12
>            Reporter: Michiel Leegwater
>             Fix For: 1.4.13
>
>         Attachments: IPageTestSource_error.zip
>
>
> The WicketTester does not handle a call to startPage(ITestPageSource) that contains a redirect/setResponsePage correctly.

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


[jira] Updated: (WICKET-3102) WicketTester does not handle startPage(ITestPageSource) that contains a redirect/setResponsePage correctly

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

Michiel Leegwater updated WICKET-3102:
--------------------------------------

    Attachment: IPageTestSource_error.zip

The attached zip file contains a test that reproduces this problem.

> WicketTester does not handle startPage(ITestPageSource) that contains a redirect/setResponsePage correctly
> ----------------------------------------------------------------------------------------------------------
>
>                 Key: WICKET-3102
>                 URL: https://issues.apache.org/jira/browse/WICKET-3102
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.4.12
>            Reporter: Michiel Leegwater
>             Fix For: 1.4.13
>
>         Attachments: IPageTestSource_error.zip
>
>
> The WicketTester does not handle a call to startPage(ITestPageSource) that contains a redirect/setResponsePage correctly.

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