Package javax.faces.application

Examples of javax.faces.application.StateManager.restoreView()


        {
            setupRequest();
           
            request.addParameter(ResponseStateManager.VIEW_STATE_PARAM, viewStateParam);
   
            UIViewRoot restoredViewRoot = stateManager.restoreView(facesContext, "/root", RenderKitFactory.HTML_BASIC_RENDER_KIT);
           
            Assert.assertNotNull(restoredViewRoot);
        }
        finally
        {
View Full Code Here


        {
            setupRequest();
           
            request.addParameter(ResponseStateManager.VIEW_STATE_PARAM, viewStateParam);
   
            UIViewRoot restoredViewRoot = stateManager.restoreView(facesContext, "/root", RenderKitFactory.HTML_BASIC_RENDER_KIT);
           
            Assert.assertNotNull(restoredViewRoot);
        }
        finally
        {
View Full Code Here

      ResponseWriter responseWriter =
    curKit.createResponseWriter(writer, "text/html",
              "ISO-8859-1");
      getFacesContext().setResponseWriter(responseWriter);
      stateManager.writeState(getFacesContext(), viewState);
      root = stateManager.restoreView(getFacesContext(), TEST_URI,
              RenderKitFactory.HTML_BASIC_RENDER_KIT);
      getFacesContext().setViewRoot(root);
  }
  catch (Throwable ioe) {
      fail();
View Full Code Here

        // make sure that the value of viewId attribute in session is an
        // instance of SerializedView.
        Object result = session.getAttribute(TEST_URI);
        assertTrue(result instanceof SerializedView);
       
        root = stateManager.restoreView(getFacesContext(), TEST_URI,
                                 RenderKitFactory.HTML_BASIC_RENDER_KIT);
      
        assertTrue(root != null);
        basicForm = (UIForm) root.findComponent("basicForm");
        assertTrue(basicForm != null);
View Full Code Here

        output.setValue("foo");
        output.setId("foo");

        stateManager.writeState(facesContext, stateManager.saveSerializedView(facesContext));

        UIViewRoot restoredViewRoot = stateManager.restoreView(facesContext, "/root", RenderKitFactory.HTML_BASIC_RENDER_KIT);
        assertNotNull("restored view root should not be null", restoredViewRoot);
    }

    public void testSaveInSessionWithoutSerialize() throws Exception
    {
View Full Code Here

        {
            setupRequest();
           
            request.addParameter(ResponseStateManager.VIEW_STATE_PARAM, viewStateParam);
   
            UIViewRoot restoredViewRoot = stateManager.restoreView(facesContext, "/root", RenderKitFactory.HTML_BASIC_RENDER_KIT);
           
            Assert.assertNotNull(restoredViewRoot);
        }
        finally
        {
View Full Code Here

        {
            setupRequest();
           
            request.addParameter(ResponseStateManager.VIEW_STATE_PARAM, viewStateParam);
   
            UIViewRoot restoredViewRoot = stateManager.restoreView(facesContext, "/root", RenderKitFactory.HTML_BASIC_RENDER_KIT);
           
            Assert.assertNotNull(restoredViewRoot);
        }
        finally
        {
View Full Code Here

        {
            setupRequest();
           
            request.addParameter(ResponseStateManager.VIEW_STATE_PARAM, viewStateParam);
   
            UIViewRoot restoredViewRoot = stateManager.restoreView(facesContext, "/root", RenderKitFactory.HTML_BASIC_RENDER_KIT);
           
            Assert.assertNotNull(restoredViewRoot);
        }
        finally
        {
View Full Code Here

        {
            setupRequest();
           
            request.addParameter(ResponseStateManager.VIEW_STATE_PARAM, viewStateParam);
   
            UIViewRoot restoredViewRoot = stateManager.restoreView(facesContext, "/root", RenderKitFactory.HTML_BASIC_RENDER_KIT);
           
            Assert.assertNotNull(restoredViewRoot);
        }
        finally
        {
View Full Code Here

            if (log.isDebugEnabled()) {
                log.debug("Clay template restoreView for " + viewId);
            }

            StateManager stateManager = context.getApplication().getStateManager();
            view = stateManager.restoreView(context, normalizeViewId(viewId, index), calculateRenderKitId(context));
            //if a clay template was restored, clear the request param on the forward for
            //clean navigation to non clay templates
            if (view != null) {
                context.getExternalContext().getRequestMap().put(Globals.CLAY_FULL_VIEW_SUFFIX, null);
                context.getExternalContext().getRequestMap().put(Globals.CLAY_FULL_VIEW_RESTORE_IND, Boolean.TRUE);
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.