Wicket
  1. Wicket
  2. WICKET-487

Buggy behaviour in PageMap.access(IPageMapEntry,int). Wicket1.2.4

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.2.4, 1.2.5
    • Fix Version/s: 1.2.7, 1.3.0-rc1
    • Component/s: wicket
    • Labels:
      None

      Description

      On 4/19/07, Kadir Sener GUMUS <chaoticknight@gmail.com> wrote:
      Hi all,
      in our application, we were experiencing PageExpired pages. When i digged in wicket sources i found something causes my problem and now it is ok after change the behaviour. I dont know if it was fixed in later releases, i wanted to share that you all.

      Plz enlighten me if i am wrong or that is an expected behaviour. Let me explain the case:
      Assume that we have a pageMap contains 3 page entry inside as ordered as "pageA.version0, pageB.version0, pageB.version1" and we pressed the back button from pageB.v1 to pageB.v0! Before calling this "access(IPageMapEntry,int)" method in "get(int,int)" of PageMap, "page.getVersion(versionNumber)" method is called. In that method, if the page goes back to initial version(0), versionManager is removed! Therefore, " topPage.getVersions()" returns 1 as default. Consequently, "else" block was running and removing whole page (pageB), and......Bomb!! "PageExpired"

      Here it is the changed code:

      ....(PageMap.class)
      private

      final void access( final IPageMapEntry entry, final int version)

      { ..... if (top instanceof Page) { // If there's more than one version Page topPage = (Page)top; if (topPage.getVersions() > 1) { // Remove version the top access version (-1) topPage.getVersion(topAccess.getVersion()-1); } //--- PLZ look at here!! (K.GUMUS) //else else if (topPage.getNumericId() != access.id && topPage.getCurrentVersionNumber() != access. version) { // Remove whole page remove(topPage); } }

      ....

      regards,
      Kadir Sener GUMUS

        Activity

          People

          • Assignee:
            Johan Compagner
            Reporter:
            Kadir Sener GUMUS
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development