org.apache.tapestry5.annotations

## Annotation Type SessionState

-     @Target(value=FIELD)
      @Documented
      @Retention(value=RUNTIME)
      @UseWith(value={COMPONENT,MIXIN,PAGE})
      public @interface SessionState

  Marker annotation for a field that is a session state object (SSO) as controlled by the `ApplicationStateManager`. An SSO stored as global session object (i.e., in the `ServletContext`); every page or component. In fact, the built-in strategies for ASO management are very user specific, ultimately storing data in the `Session`.

  An SSO field may have a companion field, of type boolean, used to see if the SSO has been created yet. If another field exists with the same name, suffixed with "Exists" (i.e., "sso" for the SSO field, and "ssoExists" for the companion field) and the type of that field is boolean, then access to the field will determine whether the SSO has already been created. This is necessary because even a null check ("sso != null") may force the SSO to be created. Instead, check the companion boolean field ("asoExists").

  Note: Tapestry 5.0 called these objects "Application State Objects"; thus many of the underlying services have a confusing name (ApplicationStateManager, which really should be SessionStateManager ... but can't be renamed for backwards compatibility reasons).
  Since:
    5.1.0.4

- - ### Optional Element Summary

    Optional Elements
    Modifier and Type | Optional Element and Description
    --- | ---
    `boolean` | `create` If true (the default), then referencing an field marked with the annotation will create the SSO.

- - ### Element Detail

    - #### create

          public abstract boolean create

      If true (the default), then referencing an field marked with the annotation will create the SSO. If false, then accessing the field will not create the SSO, it will only allow access to it if it already exists.
      Default:
        true

${project.version} - Copyright © 2003-2014 The Apache Software Foundation.