Package org.apache.myfaces.extensions.cdi.core.api.scope.conversation.config

Examples of org.apache.myfaces.extensions.cdi.core.api.scope.conversation.config.WindowContextConfig


            BeanManager beanManager = BeanManagerProvider.getInstance().getBeanManager();

            EditableWindowContextManager windowContextManager =
                    CodiUtils.getContextualReferenceByClass(beanManager, EditableWindowContextManager.class);

            WindowContextConfig windowContextConfig =
                    CodiUtils.getContextualReferenceByClass(beanManager, WindowContextConfig.class);

            ViewAccessConversationExpirationEvaluatorRegistry registry =
                    CodiUtils.getContextualReferenceByClass(
                            beanManager, ViewAccessConversationExpirationEvaluatorRegistry.class);

            UIViewRoot uiViewRoot = facesContext.getViewRoot();

            //e.g. in case of a ViewExpiredException (e.g. in case of an expired session)
            if(uiViewRoot == null)
            {
                return;
            }

            registry.broadcastRenderedViewId(uiViewRoot.getViewId());

            storeCurrentViewIdAsOldViewId(facesContext);

            if(windowContextConfig.isCloseEmptyWindowContextsEnabled())
            {
                cleanupInactiveWindowContexts(windowContextManager);
            }
        }
        catch (ContextNotActiveException e)
View Full Code Here


            BeanManagerProvider beanManagerProvider = BeanManagerProvider.getInstance();
            EditableWindowContextManager windowContextManager =
                    beanManagerProvider.getContextualReference(EditableWindowContextManager.class);
            WindowHandler windowHandler =
                    beanManagerProvider.getContextualReference(WindowHandler.class);
            WindowContextConfig windowContextConfig =
                    beanManagerProvider.getContextualReference(WindowContextConfig.class);

            ConversationUtils.tryToRestoreTheWindowIdEagerly(facesContext,
                    windowContextManager, windowHandler, windowContextConfig);
View Full Code Here

        BeanManager beanManager = BeanManagerProvider.getInstance().getBeanManager();

        EditableWindowContextManager windowContextManager =
                CodiUtils.getContextualReferenceByClass(beanManager, EditableWindowContextManager.class);

        WindowContextConfig windowContextConfig =
                CodiUtils.getContextualReferenceByClass(beanManager, WindowContextConfig.class);

        ViewAccessConversationExpirationEvaluatorRegistry registry =
                CodiUtils.getContextualReferenceByClass(
                        beanManager, ViewAccessConversationExpirationEvaluatorRegistry.class);

        registry.broadcastRenderedViewId(facesContext.getViewRoot().getViewId());

        storeCurrentViewIdAsOldViewId(facesContext);

        if(windowContextConfig.isCloseEmptyWindowContextsEnabled())
        {
            cleanupInactiveWindowContexts(windowContextManager);
        }

        //if the cache would get resetted by an observer or a phase-listener
View Full Code Here

            BeanManagerProvider beanManagerProvider = BeanManagerProvider.getInstance();
            EditableWindowContextManager windowContextManager =
                    beanManagerProvider.getContextualReference(EditableWindowContextManager.class);
            WindowHandler windowHandler =
                    beanManagerProvider.getContextualReference(WindowHandler.class);
            WindowContextConfig windowContextConfig =
                    beanManagerProvider.getContextualReference(WindowContextConfig.class);

            ConversationUtils.tryToRestoreTheWindowIdEagerly(facesContext,
                    windowContextManager, windowHandler, windowContextConfig);
View Full Code Here

    }

    @Test
    public void testAlternativeWindowContextConfig()
    {
        WindowContextConfig windowContextConfig = new AlternativeWindowContextConfig();

        assertEquals(windowContextConfig.getMaxWindowContextCount(), 64);
        assertEquals(windowContextConfig.getWindowContextTimeoutInMinutes(), 60);
        assertEquals(windowContextConfig.isUrlParameterSupported(), true);
        assertEquals(windowContextConfig.isUnknownWindowIdsAllowed(), false);
        assertEquals(windowContextConfig.isAddWindowIdToActionUrlsEnabled(), false);
        assertEquals(windowContextConfig.isCloseEmptyWindowContextsEnabled(), false);
        assertEquals(windowContextConfig.isEagerWindowContextDetectionEnabled(), true);
        assertEquals(windowContextConfig.isCreateWindowContextEventEnabled(), false);
        assertEquals(windowContextConfig.isCloseWindowContextEventEnabled(), false);
    }
View Full Code Here

            BeanManager beanManager = BeanManagerProvider.getInstance().getBeanManager();

            EditableWindowContextManager windowContextManager =
                    CodiUtils.getContextualReferenceByClass(beanManager, EditableWindowContextManager.class);

            WindowContextConfig windowContextConfig =
                    CodiUtils.getContextualReferenceByClass(beanManager, WindowContextConfig.class);

            ViewAccessConversationExpirationEvaluatorRegistry registry =
                    CodiUtils.getContextualReferenceByClass(
                            beanManager, ViewAccessConversationExpirationEvaluatorRegistry.class);

            UIViewRoot uiViewRoot = facesContext.getViewRoot();

            //e.g. in case of a ViewExpiredException (e.g. in case of an expired session)
            if(uiViewRoot == null)
            {
                return;
            }

            registry.broadcastRenderedViewId(uiViewRoot.getViewId());

            storeCurrentViewIdAsOldViewId(facesContext);

            if(windowContextConfig.isCloseEmptyWindowContextsEnabled())
            {
                cleanupInactiveWindowContexts(windowContextManager);
            }
        }
        catch (ContextNotActiveException e)
View Full Code Here

            BeanManagerProvider beanManagerProvider = BeanManagerProvider.getInstance();
            EditableWindowContextManager windowContextManager =
                    beanManagerProvider.getContextualReference(EditableWindowContextManager.class);
            WindowHandler windowHandler =
                    beanManagerProvider.getContextualReference(WindowHandler.class);
            WindowContextConfig windowContextConfig =
                    beanManagerProvider.getContextualReference(WindowContextConfig.class);

            ConversationUtils.tryToRestoreTheWindowIdEagerly(facesContext,
                    windowContextManager, windowHandler, windowContextConfig);
View Full Code Here

            BeanManager beanManager = BeanManagerProvider.getInstance().getBeanManager();

            EditableWindowContextManager windowContextManager =
                    CodiUtils.getContextualReferenceByClass(beanManager, EditableWindowContextManager.class);

            WindowContextConfig windowContextConfig =
                    CodiUtils.getContextualReferenceByClass(beanManager, WindowContextConfig.class);

            ViewAccessConversationExpirationEvaluatorRegistry registry =
                    CodiUtils.getContextualReferenceByClass(
                            beanManager, ViewAccessConversationExpirationEvaluatorRegistry.class);

            UIViewRoot uiViewRoot = facesContext.getViewRoot();

            //e.g. in case of a ViewExpiredException (e.g. in case of an expired session)
            if(uiViewRoot == null)
            {
                return;
            }

            registry.broadcastRenderedViewId(uiViewRoot.getViewId());

            storeCurrentViewIdAsOldViewId(facesContext);

            if(windowContextConfig.isCloseEmptyWindowContextsEnabled())
            {
                cleanupInactiveWindowContexts(windowContextManager);
            }
        }
        catch (ContextNotActiveException e)
View Full Code Here

        BeanManager beanManager = BeanManagerProvider.getInstance().getBeanManager();

        EditableWindowContextManager windowContextManager =
                CodiUtils.getContextualReferenceByClass(beanManager, EditableWindowContextManager.class);

        WindowContextConfig windowContextConfig =
                CodiUtils.getContextualReferenceByClass(beanManager, WindowContextConfig.class);

        ViewAccessConversationExpirationEvaluatorRegistry registry =
                CodiUtils.getContextualReferenceByClass(
                        beanManager, ViewAccessConversationExpirationEvaluatorRegistry.class);

        UIViewRoot uiViewRoot = facesContext.getViewRoot();

        //e.g. in case of a ViewExpiredException (e.g. in case of an expired session)
        if(uiViewRoot == null)
        {
            return;
        }

        registry.broadcastRenderedViewId(uiViewRoot.getViewId());

        storeCurrentViewIdAsOldViewId(facesContext);

        if(windowContextConfig.isCloseEmptyWindowContextsEnabled())
        {
            cleanupInactiveWindowContexts(windowContextManager);
        }

        //if the cache would get resetted by an observer or a phase-listener
View Full Code Here

        BeanManager beanManager = BeanManagerProvider.getInstance().getBeanManager();

        EditableWindowContextManager windowContextManager =
                CodiUtils.getContextualReferenceByClass(beanManager, EditableWindowContextManager.class);

        WindowContextConfig windowContextConfig =
                CodiUtils.getContextualReferenceByClass(beanManager, WindowContextConfig.class);

        ViewAccessConversationExpirationEvaluatorRegistry registry =
                CodiUtils.getContextualReferenceByClass(
                        beanManager, ViewAccessConversationExpirationEvaluatorRegistry.class);

        UIViewRoot uiViewRoot = facesContext.getViewRoot();

        //e.g. in case of a ViewExpiredException (e.g. in case of an expired session)
        if(uiViewRoot == null)
        {
            return;
        }

        registry.broadcastRenderedViewId(uiViewRoot.getViewId());

        storeCurrentViewIdAsOldViewId(facesContext);

        if(windowContextConfig.isCloseEmptyWindowContextsEnabled())
        {
            cleanupInactiveWindowContexts(windowContextManager);
        }

        //if the cache would get resetted by an observer or a phase-listener
View Full Code Here

TOP

Related Classes of org.apache.myfaces.extensions.cdi.core.api.scope.conversation.config.WindowContextConfig

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.