Package org.apache.myfaces.application

Examples of org.apache.myfaces.application.TreeStructureManager


        UIViewRoot viewRoot = facesContext.getViewRoot();
        if (viewRoot.isTransient())
        {
            return null;
        }
        TreeStructureManager tsm = new TreeStructureManager();
        Object retVal = tsm.buildTreeStructureToSave(viewRoot);
        if (log.isLoggable(Level.FINEST)) log.finest("Exiting getTreeStructureToSave");
        return retVal;
    }
View Full Code Here


            {
                if (log.isLoggable(Level.FINE)) log.fine("Exiting restoreTreeStructure - No tree structure state found in client request");
                return null;
            }

            TreeStructureManager tsm = new TreeStructureManager();
            uiViewRoot = tsm.restoreTreeStructure(treeStructure);
            if (log.isLoggable(Level.FINEST)) log.finest("Tree structure restored from client request");
        }
        else
        {
            //reconstruct tree structure from ServletSession
            Integer serverStateId = getServerStateId((Object[]) responseStateManager.getState(facesContext, viewId));

            Object[] stateObj = (Object[]) getSerializedViewFromServletSession(facesContext, viewId, serverStateId);
            if (stateObj == null)
            {
                if (log.isLoggable(Level.FINE)) log.fine("Exiting restoreTreeStructure - No serialized view found in server session!");
                return null;
            }

            SerializedView serializedView = new SerializedView(stateObj[0], stateObj[1]);
            Object treeStructure = serializedView.getStructure();
            if (treeStructure == null)
            {
                if (log.isLoggable(Level.FINE)) log.fine("Exiting restoreTreeStructure - No tree structure state found in server session, former UIViewRoot must have been transient");
                return null;
            }

            TreeStructureManager tsm = new TreeStructureManager();
            uiViewRoot = tsm.restoreTreeStructure(serializedView.getStructure());
            if (log.isLoggable(Level.FINEST)) log.finest("Tree structure restored from server session");
        }

        if (log.isLoggable(Level.FINEST)) log.finest("Exiting restoreTreeStructure");
        return uiViewRoot;
View Full Code Here

                state = getSerializedViewFromServletSession(facesContext, viewId, serverStateId);
            }

            if (state != null) {
                Object[] stateArray = (Object[])state;
                TreeStructureManager tsm = new TreeStructureManager();
                uiViewRoot = tsm.restoreTreeStructure(stateArray[0]);

                if (uiViewRoot != null) {
                    facesContext.setViewRoot (uiViewRoot);
                    uiViewRoot.processRestoreState(facesContext, stateArray[1]);
                }
View Full Code Here

        UIViewRoot viewRoot = facesContext.getViewRoot();
        if (viewRoot.isTransient())
        {
            return null;
        }
        TreeStructureManager tsm = new TreeStructureManager();
        Object retVal = tsm.buildTreeStructureToSave(viewRoot);
        if (log.isLoggable(Level.FINEST)) log.finest("Exiting getTreeStructureToSave");
        return retVal;
    }
View Full Code Here

            {
                if (log.isLoggable(Level.FINE)) log.fine("Exiting restoreTreeStructure - No tree structure state found in client request");
                return null;
            }

            TreeStructureManager tsm = new TreeStructureManager();
            uiViewRoot = tsm.restoreTreeStructure(treeStructure);
            if (log.isLoggable(Level.FINEST)) log.finest("Tree structure restored from client request");
        }
        else
        {
            //reconstruct tree structure from ServletSession
            Integer serverStateId = getServerStateId((Object[]) responseStateManager.getState(facesContext, viewId));

            Object[] stateObj = (Object[]) getSerializedViewFromServletSession(facesContext, viewId, serverStateId);
            if (stateObj == null)
            {
                if (log.isLoggable(Level.FINE)) log.fine("Exiting restoreTreeStructure - No serialized view found in server session!");
                return null;
            }

            SerializedView serializedView = new SerializedView(stateObj[0], stateObj[1]);
            Object treeStructure = serializedView.getStructure();
            if (treeStructure == null)
            {
                if (log.isLoggable(Level.FINE)) log.fine("Exiting restoreTreeStructure - No tree structure state found in server session, former UIViewRoot must have been transient");
                return null;
            }

            TreeStructureManager tsm = new TreeStructureManager();
            uiViewRoot = tsm.restoreTreeStructure(serializedView.getStructure());
            if (log.isLoggable(Level.FINEST)) log.finest("Tree structure restored from server session");
        }

        if (log.isLoggable(Level.FINEST)) log.finest("Exiting restoreTreeStructure");
        return uiViewRoot;
View Full Code Here

                state = getSerializedViewFromServletSession(facesContext, viewId, serverStateId);
            }

            if (state != null) {
                Object[] stateArray = (Object[])state;
                TreeStructureManager tsm = new TreeStructureManager();
                uiViewRoot = tsm.restoreTreeStructure(stateArray[0]);

                if (uiViewRoot != null) {
                    facesContext.setViewRoot (uiViewRoot);
                    uiViewRoot.processRestoreState(facesContext, stateArray[1]);
                }
View Full Code Here

        UIViewRoot viewRoot = facesContext.getViewRoot();
        if (viewRoot.isTransient())
        {
            return null;
        }
        TreeStructureManager tsm = new TreeStructureManager();
        Object retVal = tsm.buildTreeStructureToSave(viewRoot);
        if (log.isTraceEnabled()) log.trace("Exiting getTreeStructureToSave");
        return retVal;
    }
View Full Code Here

            {
                if (log.isDebugEnabled()) log.debug("Exiting restoreTreeStructure - No tree structure state found in client request");
                return null;
            }

            TreeStructureManager tsm = new TreeStructureManager();
            uiViewRoot = tsm.restoreTreeStructure((TreeStructureManager.TreeStructComponent)treeStructure);
            if (log.isTraceEnabled()) log.trace("Tree structure restored from client request");
        }
        else
        {
            //reconstruct tree structure from ServletSession
            SerializedView serializedView = getSerializedViewFromServletSession(facesContext,
                                                                                viewId);
            if (serializedView == null)
            {
                if (log.isDebugEnabled()) log.debug("Exiting restoreTreeStructure - No serialized view found in server session!");
                return null;
            }

            Object treeStructure = serializedView.getStructure();
            if (treeStructure == null)
            {
                if (log.isDebugEnabled()) log.debug("Exiting restoreTreeStructure - No tree structure state found in server session, former UIViewRoot must have been transient");
                return null;
            }

            TreeStructureManager tsm = new TreeStructureManager();
            uiViewRoot = tsm.restoreTreeStructure((TreeStructureManager.TreeStructComponent)serializedView.getStructure());
            if (log.isTraceEnabled()) log.trace("Tree structure restored from server session");
        }

        if (log.isTraceEnabled()) log.trace("Exiting restoreTreeStructure");
        return uiViewRoot;
View Full Code Here

        UIViewRoot viewRoot = facesContext.getViewRoot();
        if (viewRoot.isTransient())
        {
            return null;
        }
        TreeStructureManager tsm = new TreeStructureManager();
        Object retVal = tsm.buildTreeStructureToSave(viewRoot);
        if (log.isLoggable(Level.FINEST)) log.finest("Exiting getTreeStructureToSave");
        return retVal;
    }
View Full Code Here

            {
                if (log.isLoggable(Level.FINE)) log.fine("Exiting restoreTreeStructure - No tree structure state found in client request");
                return null;
            }

            TreeStructureManager tsm = new TreeStructureManager();
            uiViewRoot = tsm.restoreTreeStructure(treeStructure);
            if (log.isLoggable(Level.FINEST)) log.finest("Tree structure restored from client request");
        }
        else
        {
            //reconstruct tree structure from ServletSession
            Integer serverStateId = getServerStateId((Object[]) responseStateManager.getState(facesContext, viewId));

            Object[] stateObj = (Object[])( (serverStateId == null)? null : getSerializedViewFromServletSession(facesContext, viewId, serverStateId) );
            if (stateObj == null)
            {
                if (log.isLoggable(Level.FINE)) log.fine("Exiting restoreTreeStructure - No serialized view found in server session!");
                return null;
            }

            SerializedView serializedView = new SerializedView(stateObj[0], stateObj[1]);
            Object treeStructure = serializedView.getStructure();
            if (treeStructure == null)
            {
                if (log.isLoggable(Level.FINE)) log.fine("Exiting restoreTreeStructure - No tree structure state found in server session, former UIViewRoot must have been transient");
                return null;
            }

            TreeStructureManager tsm = new TreeStructureManager();
            uiViewRoot = tsm.restoreTreeStructure(serializedView.getStructure());
            if (log.isLoggable(Level.FINEST)) log.finest("Tree structure restored from server session");
        }

        if (log.isLoggable(Level.FINEST)) log.finest("Exiting restoreTreeStructure");
        return uiViewRoot;
View Full Code Here

TOP

Related Classes of org.apache.myfaces.application.TreeStructureManager

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.