Package javax.faces.component

Examples of javax.faces.component.UIViewRoot.processSaveState()


        if (LOGGER.isLoggable(Level.FINE)) {
            LOGGER.fine("Begin creating serialized view for "
                        + viewRoot.getViewId());
        }
        List<TreeNode> treeList = new ArrayList<TreeNode>(32);
        Object state = viewRoot.processSaveState(context);
        captureChild(treeList, 0, viewRoot);       
        Object[] tree = treeList.toArray();     
       
        if (LOGGER.isLoggable(Level.FINE)) {
            LOGGER.fine("End creating serialized view " + viewRoot.getViewId());
View Full Code Here


        if (viewRoot.isTransient())
        {
            return null;
        }

        Object serializedComponentStates = viewRoot.processSaveState(facesContext);
        //Locale is a state attribute of UIViewRoot and need not be saved explicitly
        if (log.isLoggable(Level.FINEST))
        {
            log.finest("Exiting getComponentStateToSave");
        }
View Full Code Here

            if (view.getAttributes().containsKey(COMPONENT_ADDED_AFTER_BUILD_VIEW))
            {
                ensureClearInitialState(view);
                states = new Object[]{
                            internalBuildTreeStructureToSave(view),
                            view.processSaveState(context)};
            }
            else
            {
                states = new HashMap<String, Object>();
View Full Code Here

    FacesContext current = FacesContext.getCurrentInstance();
    try
    {
      TestFacesContext.setCurrentInstance(facesContext);
      root.processSaveState(facesContext);
      doRenderResponse(facesContext, root);
    }
    finally
    {
      TestFacesContext.setCurrentInstance(current);
View Full Code Here

        if (viewRoot.isTransient())
        {
            return null;
        }

        Object serializedComponentStates = viewRoot.processSaveState(facesContext);
        //Locale is a state attribute of UIViewRoot and need not be saved explicitly
        if (log.isLoggable(Level.FINEST))
        {
            log.finest("Exiting getComponentStateToSave");
        }
View Full Code Here

    FacesContext current = FacesContext.getCurrentInstance();
    try
    {
      TestFacesContext.setCurrentInstance(facesContext);
      root.processSaveState(facesContext);
      doRenderResponse(facesContext, root);
    }
    finally
    {
      TestFacesContext.setCurrentInstance(current);
View Full Code Here

        getFacesContext().getViewRoot().setLocale(Locale.US);
        root.getChildren().add(form = new UIForm());
        form.getChildren().add(input = new UIInput());
        input.setValueBinding("buckaroo", getFacesContext().getApplication()
                .createValueBinding("#{TestBean.indexProperties[0]}"));
        state = root.processSaveState(getFacesContext());

        // synthesize the tree structure
        getFacesContext().setViewRoot(
                root = Util.getViewHandler(getFacesContext()).createView(
                        getFacesContext(), null));
View Full Code Here

            Util.checkIdUniqueness(context,
                                   viewRoot,
                                   new HashSet<String>(viewRoot.getChildCount() << 1));

            List<TreeNode> treeList = new ArrayList<TreeNode>(32);
            Object state = viewRoot.processSaveState(context);
            captureChild(treeList, 0, viewRoot);
            Object[] tree = treeList.toArray();

            result = new Object[]{tree, state};
        }
View Full Code Here

        if (viewRoot.isTransient())
        {
            return null;
        }

        Object serializedComponentStates = viewRoot.processSaveState(facesContext);
        //Locale is a state attribute of UIViewRoot and need not be saved explicitly
        if (log.isTraceEnabled()) log.trace("Exiting getComponentStateToSave");
        return serializedComponentStates;
    }
View Full Code Here

    createTree();
    MockComponentState mockState = (MockComponentState) adaptor.getComponentState();
    mockState.setCount(123);
    adaptor.encodeBegin(facesContext);
    UIViewRoot viewRoot = facesContext.getViewRoot();
    Object treeState = viewRoot.processSaveState(facesContext);
    UIViewRoot root = (UIViewRoot) viewRoot.getClass().newInstance();
    UIDataAdaptor restoredAdaptor = new MockDataAdaptor();
    root.getChildren().add(restoredAdaptor);
    root.processRestoreState(facesContext, treeState);
    mockState = (MockComponentState) restoredAdaptor.getComponentState();
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.