Interface FormSession


public interface FormSession
The FormSession interface represents a single browser window, usually a separate tab within the browser. Each one of these browser windows can be executing an Ebase form, and each one of these forms needs to maintain its own state data independent of the others. This interface contains methods that give access to form session attributes - these exist for the duration of the HTTP session, but are limited in scope to just a single form session - usually a browser tab.
Since:
V4.4
  • Method Summary

    Modifier and Type Method Description
    java.lang.Object getFormSessionAttribute​(java.lang.String attributeName)
    Returns the value of the form session attribute named by attributeName.
    java.lang.String getFormSessionId()
    Returns the Ebase form session identifier.
    void invalidate()
    Invalidates the current form session and frees all memory associated with it
    void invalidate​(java.lang.String formSessionId)
    Invalidates the specified form session and frees all memory associated with it
    void removeFormSessionAttribute​(java.lang.String attributeName)
    Removes the form session attribute named by attributeName.
    void setFormSessionAttribute​(java.lang.String attributeName, java.lang.Object value)
    Sets the value of the form session attribute named by attributeName.
  • Method Details

    • getFormSessionId

      java.lang.String getFormSessionId()
      Returns the Ebase form session identifier.

      A form session represents a single browser window, usually as a separate tab within the browser. Each one of these browser windows can be executing a separate instance of a form, and each one of these form instances maintains its own state data independent of the others. This is achieved by giving each window a distinct form session context, each one of which is identified by a form session identifier. An Http session can contain any number of form sessions.

      Attributes can be added to the form session in the same way as for the Http session.

      Further documentation.

      Returns:
      form session identifier
      Since:
      V4.4
    • getFormSessionAttribute

      java.lang.Object getFormSessionAttribute​(java.lang.String attributeName)
      Returns the value of the form session attribute named by attributeName. See getFormSessionId() for information on form sessions.

      Note that this method returns the state of the object at the time of calling setFormSessionAttribute(), any changes made to the saved object after this point will not be reflected in the object returned by this method.

      Parameters:
      attributeName - form session attribute name
      Returns:
      form session attribute value
      Since:
      V4.4
    • setFormSessionAttribute

      void setFormSessionAttribute​(java.lang.String attributeName, java.lang.Object value)
      Sets the value of the form session attribute named by attributeName. See getFormSessionId() for information on form sessions.

      Note that getFormSessionAttribute() returns the state of the object at the time of calling this method, any changes made to the saved object after calling this method will not be reflected in the object returned by getFormSessionAttribute().

      Parameters:
      attributeName - form session attribute name
      value - new value for the form session attribute
      Since:
      V4.4
    • removeFormSessionAttribute

      void removeFormSessionAttribute​(java.lang.String attributeName)
      Removes the form session attribute named by attributeName. See getFormSessionId() for information on form sessions.
      Parameters:
      attributeName - form session attribute name
      Since:
      V4.4
    • invalidate

      void invalidate()
      Invalidates the current form session and frees all memory associated with it
      Since:
      V5.0
    • invalidate

      void invalidate​(java.lang.String formSessionId)
      Invalidates the specified form session and frees all memory associated with it
      Since:
      V5.0