Package org.apache.myfaces.extensions.cdi.jsf.impl.scope.conversation.spi

Examples of org.apache.myfaces.extensions.cdi.jsf.impl.scope.conversation.spi.EditableWindowContext


            {
                return;
            }
        }

        EditableWindowContext windowContext = (EditableWindowContext)windowContextManager.getCurrentWindowContext();
        //don't refactor it to a lazy restore
        storeCurrentViewIdAsNewViewId(phaseEvent.getFacesContext(), windowContext);

        //don't refactor it - the messages have to be restored directly after restoring the window-context(-id)
        tryToRestoreMessages(phaseEvent.getFacesContext(), windowContext, jsfModuleConfig);
View Full Code Here


    }

    private void removeEldestWindowContext(EditableWindowContextManager editableWindowContextManager,
                                           Collection<EditableWindowContext> activeWindowContexts)
    {
        EditableWindowContext windowContextToRemove = findEldestWindowContext(activeWindowContexts);

        if(windowContextToRemove != null)
        {
            editableWindowContextManager.closeWindowContext(windowContextToRemove);
        }
View Full Code Here

    }

    private EditableWindowContext findEldestWindowContext(Collection<EditableWindowContext> activeWindowContexts)
    {
        Date lastAccess = new Date();
        EditableWindowContext result = null;
        for(EditableWindowContext windowContext : activeWindowContexts)
        {
            if(lastAccess.after(windowContext.getLastAccess()))
            {
                lastAccess = windowContext.getLastAccess();
View Full Code Here

        return this.windowContextMap.size() + 1;
    }

    public synchronized WindowContext getWindowContext(String windowContextId)
    {
        EditableWindowContext result = this.windowContextMap.get(windowContextId);

        if(result != null && !result.isActive())
        {
            closeWindowContext(result);
            result = null;
        }

        if (result == null)
        {
            result = createWindowContext(windowContextId);

            this.windowContextMap.put(windowContextId, result);
        }

        result.touch();

        return result;
    }
View Full Code Here

        {
            return windowContextFactory.createWindowContext(
                    windowContextId, this.windowContextConfig, this.conversationConfig);
        }

        EditableWindowContext windowContext = new JsfWindowContext(windowContextId,
                                                                   this.windowContextConfig,
                                                                   this.conversationConfig,
                                                                   this.projectStageDevelopment,
                                                                   this.beanManager);
View Full Code Here

            {
                return;
            }
        }

        EditableWindowContext windowContext = (EditableWindowContext)windowContextManager.getCurrentWindowContext();
        //don't refactor it to a lazy restore
        storeCurrentViewIdAsNewViewId(phaseEvent.getFacesContext(), windowContext);

        //for performance reasons + cleanup at the beginning of the request (check timeout,...)
        //+ we aren't allowed to cleanup in case of redirects
View Full Code Here

        return this.windowContextMap.size() + 1;
    }

    public synchronized WindowContext getWindowContext(String windowContextId)
    {
        EditableWindowContext result = this.windowContextMap.get(windowContextId);

        if(result != null && !result.isActive())
        {
            closeWindowContext(result);
            result = null;
        }

        if (result == null)
        {
            result = createWindowContext(windowContextId);

            this.windowContextMap.put(windowContextId, result);
        }

        result.touch();

        return result;
    }
View Full Code Here

        {
            return windowContextFactory.createWindowContext(
                    windowContextId, this.windowContextConfig, this.conversationConfig);
        }

        EditableWindowContext windowContext = new JsfWindowContext(windowContextId,
                                                                   this.windowContextConfig,
                                                                   this.conversationConfig,
                                                                   this.projectStageDevelopment,
                                                                   this.beanManager);
View Full Code Here

            {
                return;
            }
        }

        EditableWindowContext windowContext = (EditableWindowContext)windowContextManager.getCurrentWindowContext();
        //don't refactor it to a lazy restore
        storeCurrentViewIdAsNewViewId(phaseEvent.getFacesContext(), windowContext);

        //don't refactor it - the messages have to be restored directly after restoring the window-context(-id)
        tryToRestoreMessages(phaseEvent.getFacesContext(), windowContext, jsfModuleConfig);
View Full Code Here

        return this.windowContextMap.size() + 1;
    }

    public synchronized WindowContext getWindowContext(String windowContextId)
    {
        EditableWindowContext result = this.windowContextMap.get(windowContextId);

        if(result != null && !result.isActive())
        {
            closeWindowContext(result);
            result = null;
        }

        if (result == null)
        {
            result = createWindowContext(windowContextId);

            this.windowContextMap.put(windowContextId, result);
        }

        result.touch();

        return result;
    }
View Full Code Here

TOP

Related Classes of org.apache.myfaces.extensions.cdi.jsf.impl.scope.conversation.spi.EditableWindowContext

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.