Class WindowContextConfig
java.lang.Object
org.apache.myfaces.lifecycle.clientwindow.WindowContextConfig
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 SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionintRestricts the number of active windows.intSpecifies the time for the timeout for a window.booleanif set totrueCODI will add a windowId=xxx parameter while encoding each action URL.booleanAllows to activate the cleanup of empty window contexts to avoid cleanup e.g.booleanSpecifies if the org.apache.myfaces.extensions.cdi.core.api.scope.conversation.event.CloseWindowContextEvent will be fired.booleanSpecifies if the org.apache.myfaces.extensions.cdi.core.api.scope.conversation.event.CreateWindowContextEvent will be fired.booleanAllows to restore the window-context before the component tree gets built.booleanAllows to restrict window-ids.booleanSpecifies if it is allowed to use URL params for forwarding the current window-id.
- 
Constructor Details- 
WindowContextConfigprotected WindowContextConfig()
 
- 
- 
Method Details- 
isUrlParameterSupportedpublic 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
 
- 
isUnknownWindowIdsAllowedpublic 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 trueas 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:
- trueto allow all windowIds already present in window.name.- falseto only allow window-ids which are generated by CODI
 
- 
isAddWindowIdToActionUrlsEnabledpublic boolean isAddWindowIdToActionUrlsEnabled()if set totrueCODI will add a windowId=xxx parameter while encoding each action URL.- Returns:
- true if the window-id should be added, false otherwise
 
- 
getWindowContextTimeoutInMinutespublic 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
 
- 
getMaxWindowContextCountpublic int getMaxWindowContextCount()Restricts the number of active windows.- Returns:
- limit for active windows
 
- 
isCloseEmptyWindowContextsEnabledpublic 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
 
- 
isEagerWindowContextDetectionEnabledpublic boolean isEagerWindowContextDetectionEnabled()Allows to restore the window-context before the component tree gets built.- Returns:
- true for activating it, false otherwise
 
- 
isCreateWindowContextEventEnabledpublic 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
 
- 
isCloseWindowContextEventEnabledpublic 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
 
 
-