Package com.sun.faces.application

Examples of com.sun.faces.application.MethodBindingMethodExpressionAdapter


  }

  private MethodBindingMethodExpressionAdapter saveRestoreState(
      MethodBindingMethodExpressionAdapter adaptor) {
    MethodBindingMethodExpressionAdapter restoredAdaptor = new MethodBindingMethodExpressionAdapter();
    restoredAdaptor.restoreState(facesContext, adaptor
        .saveState(facesContext));
    return restoredAdaptor;
  }
View Full Code Here


      ois.close();
    }
  }

  public void testSaveRestoreState() throws Exception {
    MethodBindingMethodExpressionAdapter adaptor1 = new MethodBindingMethodExpressionAdapter(
        new TestMethodExpression("testValue1"));

    assertEquals("testValue1", saveRestoreState(adaptor1).invoke(facesContext, null));

    MethodBindingMethodExpressionAdapter adaptor2 = new MethodBindingMethodExpressionAdapter(
        new StateHolderTestMethodExpression("testValue2"));

    assertEquals("testValue2", saveRestoreState(adaptor2).invoke(facesContext, null));
  }
View Full Code Here

    assertEquals("testValue2", saveRestoreState(adaptor2).invoke(facesContext, null));
  }

  public void testSerializeDeserialize() throws Exception {
    MethodBindingMethodExpressionAdapter adaptor1 = new MethodBindingMethodExpressionAdapter(
        new TestMethodExpression("testValue1"));

    assertEquals("testValue1", serializeDeserialize(adaptor1).invoke(facesContext, null));

    MethodBindingMethodExpressionAdapter adaptor2 = new MethodBindingMethodExpressionAdapter(
        new StateHolderTestMethodExpression("testValue2"));

    assertEquals("testValue2", serializeDeserialize(adaptor2).invoke(facesContext, null));
  }
View Full Code Here

TOP

Related Classes of com.sun.faces.application.MethodBindingMethodExpressionAdapter

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.