Tapestry
  1. Tapestry
  2. TAPESTRY-1368

The @ApplicationState annotation should be capable of enhancing a boolean field to indicate whether the state object already exists

    Details

    • Type: New Feature New Feature
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 5.0
    • Fix Version/s: 5.0.4
    • Component/s: tapestry-core
    • Labels:
      None

      Description

      Currently, you can use @ApplicationState to identify a field that can be used to access an Application State Object:

      @ApplicationState
      private MyState _myState;

      However, there's no way to determine if the state object already exists; checking it (_myState != null) will force the object (and, perhaps, the session) into existence. A kind of "heisenbug".

      What could be done is to look for a related field of type boolean, with "Exists" appended (i.e., "_myStateExists"). This boolean flag could be enhanced to check to see if the related ASO exists or not, without creating it.

        Activity

        There are no comments yet on this issue.

          People

          • Assignee:
            Howard M. Lewis Ship
            Reporter:
            Howard M. Lewis Ship
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development