Class WindowContextConfig


  • public class WindowContextConfig
    extends Object
    Configuration for the org.apache.myfaces.extensions.cdi.core.api.scope.conversation.WindowContext - it's customizable via the Alternative or Specializes mechanism of CDI.
    • Constructor Detail

      • WindowContextConfig

        protected WindowContextConfig()
    • Method Detail

      • isUrlParameterSupported

        public boolean isUrlParameterSupported()
        Specifies if it is allowed to use URL params for forwarding the current window-id. (deactivate it e.g. for higher security - in this case it's required to use a window id provided by a component lib or a server-side window-handler)
        Returns:
        true if it is allowed to add the window-id as URL parameter
      • isUnknownWindowIdsAllowed

        public boolean isUnknownWindowIdsAllowed()
        Allows to restrict window-ids.

        With the default window handler (esp. for Faces 1.2), URLs have to contain the window-id. If users bookmark these links, they could open 2-n tabs (with the bookmark) which have the same window-id. It is only possible to prevent it if the ClientSideWindowHandler is used.

        ATTENTION: Since CODI-1.0.6 this is set to true as defalt!

        This must be enabled to:

        • allow target attributes in a href
        • support multiple webapps in an EAR scenario. Since each webapp has it's own session, they would otherwise trash their windowIds each time you link from one webapp to another one
        • play nicely with other frameworks which use the window.name for browser tab detection
        Returns:
        true to allow all windowIds already present in window.name. false to only allow window-ids which are generated by CODI
      • isAddWindowIdToActionUrlsEnabled

        public boolean isAddWindowIdToActionUrlsEnabled()
        if set to true CODI will add a windowId=xxx parameter while encoding each action URL.
        Returns:
        true if the window-id should be added, false otherwise
      • getWindowContextTimeoutInMinutes

        public int getWindowContextTimeoutInMinutes()
        Specifies the time for the timeout for a window. After a timeout is detected all beans which are only linked to the window will be destroyed.
        Returns:
        the time for the timeout for a window
      • getMaxWindowContextCount

        public int getMaxWindowContextCount()
        Restricts the number of active windows.
        Returns:
        limit for active windows
      • isCloseEmptyWindowContextsEnabled

        public boolean isCloseEmptyWindowContextsEnabled()
        Allows to activate the cleanup of empty window contexts to avoid cleanup e.g. of the eldest window context instances if the max. count is reached.
        Returns:
        true for activating it, false otherwise
      • isEagerWindowContextDetectionEnabled

        public boolean isEagerWindowContextDetectionEnabled()
        Allows to restore the window-context before the component tree gets built.
        Returns:
        true for activating it, false otherwise
      • isCreateWindowContextEventEnabled

        public boolean isCreateWindowContextEventEnabled()
        Specifies if the org.apache.myfaces.extensions.cdi.core.api.scope.conversation.event.CreateWindowContextEvent will be fired.
        Returns:
        true if the event should be fired, false otherwise
      • isCloseWindowContextEventEnabled

        public boolean isCloseWindowContextEventEnabled()
        Specifies if the org.apache.myfaces.extensions.cdi.core.api.scope.conversation.event.CloseWindowContextEvent will be fired.
        Returns:
        true if the event should be fired, false otherwise