Package javax.faces.component

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


        Object viewState = metadata.getViewRootState();
        if (viewState == null)
        {
            // (Optional, it should be always metadata)
            oldView.clearInitialState();
            viewState = oldView.saveState(context);
        }
        boolean oldProcessingEvents = context.isProcessingEvents();
        context.setProcessingEvents(false);
        try
        {
View Full Code Here


    }

    public void testPhaseMethExpressionState() throws Exception {
  UIViewRoot root = facesContext.getApplication().getViewHandler().createView(facesContext, null);
        facesContext.setViewRoot(root);
  Object state = root.saveState(facesContext);
  root = facesContext.getApplication().getViewHandler().createView(facesContext, null);
        facesContext.setViewRoot(root);
  root.restoreState(facesContext, state);

  doTestPhaseMethodExpression(root, false);
View Full Code Here

    }

    public void testPhaseListenerState() throws Exception {
  UIViewRoot root = facesContext.getApplication().getViewHandler().createView(facesContext, null);
        facesContext.setViewRoot(root);
  Object state = root.saveState(facesContext);
  root = facesContext.getApplication().getViewHandler().createView(facesContext, null);
        facesContext.setViewRoot(root);
  root.restoreState(facesContext, state);

  doTestPhaseListener(root, false);
View Full Code Here

    }

    public void testPhaseMethodExpressionAndListenerState() throws Exception {
  UIViewRoot root = facesContext.getApplication().getViewHandler().createView(facesContext, null);
        facesContext.setViewRoot(root);
  Object state = root.saveState(facesContext);
  root = facesContext.getApplication().getViewHandler().createView(facesContext, null);
        facesContext.setViewRoot(root);
  root.restoreState(facesContext, state);

  doTestPhaseMethodExpressionAndListener(root, false);
View Full Code Here

  doTestPhaseMethodExpressionAndListener(root, true);
    }

    public void testPhaseMethExpressionState() throws Exception {
  UIViewRoot root = facesContext.getApplication().getViewHandler().createView(facesContext, null);
  Object state = root.saveState(facesContext);
  root = facesContext.getApplication().getViewHandler().createView(facesContext, null);
  root.restoreState(facesContext, state);

  doTestPhaseMethodExpression(root, false);
    }
View Full Code Here

  doTestPhaseMethodExpression(root, false);
    }

    public void testPhaseListenerState() throws Exception {
  UIViewRoot root = facesContext.getApplication().getViewHandler().createView(facesContext, null);
  Object state = root.saveState(facesContext);
  root = facesContext.getApplication().getViewHandler().createView(facesContext, null);
  root.restoreState(facesContext, state);

  doTestPhaseListener(root, false);
    }
View Full Code Here

  doTestPhaseListener(root, false);
    }

    public void testPhaseMethodExpressionAndListenerState() throws Exception {
  UIViewRoot root = facesContext.getApplication().getViewHandler().createView(facesContext, null);
  Object state = root.saveState(facesContext);
  root = facesContext.getApplication().getViewHandler().createView(facesContext, null);
  root.restoreState(facesContext, state);

  doTestPhaseMethodExpressionAndListener(root, false);
    }
View Full Code Here

        // create a fake viewRoot
        UIViewRoot root = new UIViewRoot();
        root.getAttributes().put("key", "value");

        // simulate server-side-state-saving without serialization
        Object state = root.saveState(facesContext);

        // restore view
        UIViewRoot root1 = new UIViewRoot();
        root1.restoreState(facesContext, state);
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.