Description
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
Attachments
Attachments
Issue Links
- is broken by
-
WICKET-3991 SignInPanel prevents the page being Stateless when signing in with the "rember me" facility.
- Resolved