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

bernard updated WICKET-5008:
----------------------------

    Attachment: TestCase.zip

The attached testcase is focused on the expiry scenario although there could be 
others.

It contains a few workarounds for issue WICKET-4997. It checks that if a page 
was created with a default constructor or with an IModel constructor, that it 
is recreated after expiry with the default constructor.

It also checks that if the page has PageParameters, that it is recreated with 
these PageParameters which it currently is not.

The idea is that after expiry, the page is re-created consistently, to be 
valid, whith essential state information that is available in its URL i.e. the 
query string.
We could take this one step further in case the page has POST parameters in its 
request header (from form submit) that these would be used to restore its 
state, because they are available.

The page form contains an AJAX component to make it stateful.

                
> PageProvider#getPageInstance() calls wrong Page Constructor if pageParameters 
> is null
> -------------------------------------------------------------------------------------
>
>                 Key: WICKET-5008
>                 URL: https://issues.apache.org/jira/browse/WICKET-5008
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 6.4.0
>            Reporter: bernard
>         Attachments: TestCase.zip
>
>
> I was wondering why my pages' default constructors aren't called anymore 
> since after 1.4.
> The problem is that PageProvider#getPageInstance() does not distinguish 
> between pages that have parameters and pages that don't.
> This creates a messy situation for pages that accept page parameters.
> One case I know of is ListenerInterfaceRequestHandler#respond() which calls 
> ListenerInterfaceRequestHandler#getPage().
> If this call hits an expired page then the page crashes in the constructor 
> Page(final PageParameters parameters) because of the bogus parameters.
> I would expect that the default constructor is called in this case.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to