A (statless) page immediately disappears after the first render
---------------------------------------------------------------

                 Key: WICKET-3965
                 URL: https://issues.apache.org/jira/browse/WICKET-3965
             Project: Wicket
          Issue Type: Bug
          Components: wicket-core
    Affects Versions: 1.5-RC5.1
            Reporter: Martin Grigorov


Using setResponsePage(new SomeStatelessNonBookmarkablePage(aParameter)) renders 
the page but trying to reload the page in the browser fails with 
PageExpiredException.

The reason is that the page is stateless and thus it is not saved in the page 
stores. Since it was scheduled for render with setResponsePage(Page) method its 
Url is created by PageInstanceMapper (i.e. something like: wicket/page?1). An 
attempt to refresh such page fails with "Page with id '1' is not found => 
PageExpiredException".

Igor suggested to call 'page.setStatelessHint(false)' for all pages passed to 
PageProvider(IRequestablePage) constructor, i.e. such pages must be stored.
This solved the problem but exposed few more problems:
- MockPageManager (used in WicketTester) until now always touched/stored pages, 
no matter their statelessness
- org.apache.wicket.markup.html.internal.EnclosureTest.testRender10() was wrong 
for some unknown reason. All expectations against 
EnclosurePageExpectedResult_10-2.html should not have the enclosure rendered 
because "input" component is invisible

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

        

Reply via email to