Uploaded image for project: 'Wicket'
  1. Wicket
  2. WICKET-3965

A (stateless) page immediately disappears after the first render

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.5-RC5.1
    • Fix Version/s: 1.5-RC6
    • Component/s: wicket
    • Labels:
      None

      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

        1. WICKET-3965.patch
          6 kB
          Martin Tzvetanov Grigorov
        2. WICKET-3965.patch
          12 kB
          Martin Tzvetanov Grigorov

          Issue Links

            Activity

              People

              • Assignee:
                mgrigorov Martin Tzvetanov Grigorov
                Reporter:
                mgrigorov Martin Tzvetanov Grigorov
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: