Package javax.faces.view

Examples of javax.faces.view.StateManagementStrategy


        UIViewRoot uiViewRoot = facesContext.getViewRoot();
        String viewId = uiViewRoot.getViewId();
        ViewDeclarationLanguage vdl = facesContext.getApplication().getViewHandler().getViewDeclarationLanguage(facesContext,viewId);
        if (vdl != null)
        {
            StateManagementStrategy sms = vdl.getStateManagementStrategy(facesContext, viewId);
           
            if (sms != null)
            {
                if (log.isLoggable(Level.FINEST)) log.finest("Calling saveView of StateManagementStrategy from getViewState: "+sms.getClass().getName());
               
                return facesContext.getRenderKit().getResponseStateManager().getViewState(facesContext, saveView(facesContext));
            }
        }
        Object[] savedState = (Object[]) saveView(facesContext);
View Full Code Here


        UIViewRoot uiViewRoot = null;
       
        ViewDeclarationLanguage vdl = facesContext.getApplication().
            getViewHandler().getViewDeclarationLanguage(facesContext,viewId);
        StateManagementStrategy sms = null;
        if (vdl != null)
        {
            sms = vdl.getStateManagementStrategy(facesContext, viewId);
        }
       
        if (sms != null)
        {
            if (log.isLoggable(Level.FINEST))
            {
                log.finest("Redirect to StateManagementStrategy: " + sms.getClass().getName());
            }
           
            uiViewRoot = sms.restoreView(facesContext, viewId, renderKitId);
        }
        else
        {
            RenderKit renderKit = getRenderKitFactory().getRenderKit(facesContext, renderKitId);
            ResponseStateManager responseStateManager = renderKit.getResponseStateManager();
View Full Code Here

        try
        {
            facesContext.getAttributes().put(StateManager.IS_SAVING_STATE, Boolean.TRUE);
            if (vdl != null)
            {
                StateManagementStrategy sms = vdl.getStateManagementStrategy(facesContext, viewId);
               
                if (sms != null)
                {
                    if (log.isLoggable(Level.FINEST))
                    {
                        log.finest("Calling saveView of StateManagementStrategy: " + sms.getClass().getName());
                    }
                   
                    return sms.saveView(facesContext);
                }
            }
   
            // In StateManagementStrategy.saveView there is a check for transient at
            // start, but the same applies for VDL without StateManagementStrategy,
View Full Code Here

        String viewId = uiViewRoot.getViewId();
        ViewDeclarationLanguage vdl
                = facesContext.getApplication().getViewHandler().getViewDeclarationLanguage(facesContext,viewId);
        if (vdl != null)
        {
            StateManagementStrategy sms = vdl.getStateManagementStrategy(facesContext, viewId);
           
            if (sms != null)
            {
                if (log.isLoggable(Level.FINEST))
                {
                    log.finest("Calling saveView of StateManagementStrategy from getViewState: "
                               + sms.getClass().getName());
                }
               
                return facesContext.getRenderKit().getResponseStateManager().
                        getViewState(facesContext, saveView(facesContext));
            }
View Full Code Here

        UIViewRoot uiViewRoot = null;
       
        ViewDeclarationLanguage vdl = facesContext.getApplication().
            getViewHandler().getViewDeclarationLanguage(facesContext,viewId);
        StateManagementStrategy sms = null;
        if (vdl != null)
        {
            sms = vdl.getStateManagementStrategy(facesContext, viewId);
        }
       
        if (sms != null)
        {
            if (log.isLoggable(Level.FINEST))
            {
                log.finest("Redirect to StateManagementStrategy: " + sms.getClass().getName());
            }
           
            uiViewRoot = sms.restoreView(facesContext, viewId, renderKitId);
        }
        else
        {
            RenderKit renderKit = getRenderKitFactory().getRenderKit(facesContext, renderKitId);
            ResponseStateManager responseStateManager = renderKit.getResponseStateManager();
View Full Code Here

        try
        {
            facesContext.getAttributes().put(StateManager.IS_SAVING_STATE, Boolean.TRUE);
            if (vdl != null)
            {
                StateManagementStrategy sms = vdl.getStateManagementStrategy(facesContext, viewId);
               
                if (sms != null)
                {
                    if (log.isLoggable(Level.FINEST))
                    {
                        log.finest("Calling saveView of StateManagementStrategy: " + sms.getClass().getName());
                    }
                   
                    serializedView = sms.saveView(facesContext);
                   
                    // If MyfacesResponseStateManager is used, give the option to do
                    // additional operations for save the state if is necessary.
                    if (StateCacheUtils.isMyFacesResponseStateManager(responseStateManager))
                    {
View Full Code Here

                                        context, view.getViewId());

                            if (ViewDeclarationLanguage.FACELETS_VIEW_DECLARATION_LANGUAGE_ID.equals(
                                    vdl.getId()))
                            {
                                StateManagementStrategy sms = vdl.getStateManagementStrategy(
                                        context, view.getId());
                                if (sms != null)
                                {
                                    context.getAttributes().put(ViewPoolProcessor.FORCE_HARD_RESET, Boolean.TRUE);

                                    // Force indirectly to store the map in the cache
                                    try
                                    {
                                        Object state = sms.saveView(context);
                                    }
                                    finally
                                    {
                                        context.getAttributes().remove(ViewPoolProcessor.FORCE_HARD_RESET);
                                    }
View Full Code Here

                                        context, view.getViewId());

                            if (ViewDeclarationLanguage.FACELETS_VIEW_DECLARATION_LANGUAGE_ID.equals(
                                    vdl.getId()))
                            {
                                StateManagementStrategy sms = vdl.getStateManagementStrategy(
                                        context, view.getId());
                                if (sms != null)
                                {
                                    context.getAttributes().put(ViewPoolProcessor.FORCE_HARD_RESET, Boolean.TRUE);

                                    // Force indirectly to store the map in the cache
                                    try
                                    {
                                        Object state = sms.saveView(context);
                                    }
                                    finally
                                    {
                                        context.getAttributes().remove(ViewPoolProcessor.FORCE_HARD_RESET);
                                    }
View Full Code Here

        UIViewRoot uiViewRoot = null;
       
        ViewDeclarationLanguage vdl = facesContext.getApplication().
            getViewHandler().getViewDeclarationLanguage(facesContext,viewId);
        StateManagementStrategy sms = null;
        if (vdl != null)
        {
            sms = vdl.getStateManagementStrategy(facesContext, viewId);
        }
       
        if (sms != null)
        {
            if (log.isLoggable(Level.FINEST)) log.finest("Redirect to StateManagementStrategy: "+sms.getClass().getName());
           
            uiViewRoot = sms.restoreView(facesContext, viewId, renderKitId);
        }
        else
        {
            RenderKit renderKit = getRenderKitFactory().getRenderKit(facesContext, renderKitId);
            ResponseStateManager responseStateManager = renderKit.getResponseStateManager();
View Full Code Here

        String viewId = uiViewRoot.getViewId();
        ViewDeclarationLanguage vdl = facesContext.getApplication().
            getViewHandler().getViewDeclarationLanguage(facesContext,viewId);
        if (vdl != null)
        {
            StateManagementStrategy sms = vdl.getStateManagementStrategy(facesContext, viewId);
           
            if (sms != null)
            {
                if (log.isLoggable(Level.FINEST)) log.finest("Calling saveView of StateManagementStrategy: "+sms.getClass().getName());
               
                return sms.saveView(facesContext);
            }
        }

        // In StateManagementStrategy.saveView there is a check for transient at
        // start, but the same applies for VDL without StateManagementStrategy,
View Full Code Here

TOP

Related Classes of javax.faces.view.StateManagementStrategy

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.