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

Should adding AJAX behaviour to a page make it stateful?

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 1.3.5
    • 1.3.6, 1.4-RC2
    • wicket
    • None
    • Any

    Description

      For full history see http://www.nabble.com/Using-AbstractDefaultAjaxBehavior-on-a-Bookmarkable-page--td21562119.html

      Igor,

      I've had a look at Wayne's quickstart.

      The problem he hit is that if a page, P, with a no-args constructor (ie P is "bookmarkable") has an AJAX behaviour added to it and P is arrived at via a BookmarkablePageLink on some other page, then Wicket can't find that P instance in the session to handle any callbacks and delivers the infamous "Page Expired" page. If you add the same AJAX behaviour to a label on P, then the callback works.

      If you change the BookmarkablePageLink to a PageLink things work as expected.

      It's almost as if, when the the page is created due to a click on a BookmarkableLink, Wicket is deciding it only needs to consider the page stateful if it contains components that have callbacks/ajax-bahaviours, but if there are none, it doesn't bother checking the page object itself for such callbacks. Is that what you'd expect?

      The result is the same with both 1.3.5 and 1.4-rc1.

      See the attached quickstart which is the simplest example I could make to demonstrate what Wayne sent me.

      Regards - Cemal
      http://www.jWeekend.co.uk

      Attachments

        1. quickstart.zip
          6 kB
          jWeekend

        Activity

          People

            ivaynberg Igor Vaynberg
            jweekend jWeekend
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: