Wicket
  1. Wicket
  2. WICKET-4763

Page's stateless hint is initially set to 'false'

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 6.0.0
    • Fix Version/s: 6.1.0, 1.5.9
    • Component/s: wicket-devutils
    • Labels:
      None

      Description

      If RenderPerformanceListener is active then sessions will be created even for stateless pages. This happens because RPL is an IComponentInstantiationListener which adds a Behavior to every component. That causes a call to addStateChange() which in turns calls AbstractPageManager#touchPage. At this point #isPageStateless always returns false and so a session is bound. The problem is that all this happens very early in the creation of a Component when it's not fully initialized yet. If RPL implemented IComponentInitializationListener instead this problem wouldn't occur.

      I can't really tell if it's a bug or not that adding a Behavior in an IComponentInstantiationListener makes pages stateful... Maybe that's just generally not a good idea.

        Activity

        Hide
        Martin Grigorov added a comment -

        Pages by default should be stateless. From now on Component#FLAG_RESERVED5 (Page#STATELESS_HINT) is set to 'true' by default.

        Show
        Martin Grigorov added a comment - Pages by default should be stateless. From now on Component#FLAG_RESERVED5 (Page#STATELESS_HINT) is set to 'true' by default.

          People

          • Assignee:
            Martin Grigorov
            Reporter:
            Christoph Leiter
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development