Examples of restoreSerializedView()


Examples of org.apache.myfaces.application.StateCache.restoreSerializedView()

       
        try
        {
            setupRequest();
           
            Object value = stateCache.restoreSerializedView(facesContext, "view1.xhtml", savedToken);
           
            Assert.assertEquals(1, value);
           
            facesContext.getViewRoot().setViewId("view2.xhtml");
            savedToken = stateCache.saveSerializedView(facesContext, 2);
View Full Code Here

Examples of org.apache.myfaces.application.StateCache.restoreSerializedView()

        try
        {
            setupRequest();
           
            Object value = stateCache.restoreSerializedView(facesContext, "view2.xhtml", savedToken);
           
            Assert.assertEquals(2, value);
           
            facesContext.getViewRoot().setViewId("view2.xhtml");
            savedToken = stateCache.saveSerializedView(facesContext, 3);
View Full Code Here

Examples of org.apache.myfaces.application.StateCache.restoreSerializedView()

       
        try
        {
            setupRequest();
           
            Object value = stateCache.restoreSerializedView(facesContext, "view1.xhtml", firstSavedToken);
           
            // Since org.apache.myfaces.NUMBER_OF_SEQUENTIAL_VIEWS_IN_SESSION is 2, the first one was already discarded
            Assert.assertNull(value);
        }
        finally
View Full Code Here

Examples of org.apache.myfaces.application.StateCache.restoreSerializedView()

           
            // Note we are trying to restore restoring another different view with a token from the previous view.
            // It should return null and later throw ViewExpiredException
            // In server side state saving, the hashCode of the viewId should be part of the key used to restore
            // the state, along with a counter.
            Object value = stateCache.restoreSerializedView(facesContext, "/view2.xhtml", firstSavedToken);
           
            Assert.assertNull(value);
        }
        finally
        {
View Full Code Here

Examples of org.apache.myfaces.application.StateCache.restoreSerializedView()

        try
        {
            setupRequest();
           
            // It should restore this:
            Object value = stateCache.restoreSerializedView(facesContext, "/view1.xhtml", firstSavedToken);
           
            Assert.assertEquals(1, value);
        }
        finally
        {
View Full Code Here

Examples of org.apache.myfaces.application.StateCache.restoreSerializedView()

       
        try
        {
            setupRequest();
           
            Object value = stateCache.restoreSerializedView(facesContext, "view1.xhtml", savedToken);
           
            Assert.assertEquals(1, value);
           
            facesContext.getViewRoot().setViewId("view2.xhtml");
            savedToken = stateCache.saveSerializedView(facesContext, 2);
View Full Code Here

Examples of org.apache.myfaces.application.StateCache.restoreSerializedView()

        try
        {
            setupRequest();
           
            Object value = stateCache.restoreSerializedView(facesContext, "view2.xhtml", savedToken);
           
            Assert.assertEquals(2, value);
           
            facesContext.getViewRoot().setViewId("view2.xhtml");
            savedToken = stateCache.saveSerializedView(facesContext, 3);
View Full Code Here

Examples of org.apache.myfaces.application.StateCache.restoreSerializedView()

       
        try
        {
            setupRequest();
           
            Object value = stateCache.restoreSerializedView(facesContext, "view1.xhtml", firstSavedToken);
           
            // Since org.apache.myfaces.NUMBER_OF_SEQUENTIAL_VIEWS_IN_SESSION is 2, the first one was already discarded
            Assert.assertNull(value);
        }
        finally
View Full Code Here

Examples of org.apache.myfaces.application.StateCache.restoreSerializedView()

           
            // Note we are trying to restore restoring another different view with a token from the previous view.
            // It should return null and later throw ViewExpiredException
            // In server side state saving, the hashCode of the viewId should be part of the key used to restore
            // the state, along with a counter.
            Object value = stateCache.restoreSerializedView(facesContext, "/view2.xhtml", firstSavedToken);
           
            Assert.assertNull(value);
        }
        finally
        {
View Full Code Here

Examples of org.apache.myfaces.application.StateCache.restoreSerializedView()

        try
        {
            setupRequest();
           
            // It should restore this:
            Object value = stateCache.restoreSerializedView(facesContext, "/view1.xhtml", firstSavedToken);
           
            Assert.assertEquals(1, value);
        }
        finally
        {
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.