Package org.richfaces.webapp.taglib

Examples of org.richfaces.webapp.taglib.ValueBindingValueExpressionAdaptor


  }

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


      ois.close();
    }
  }

  public void testSaveRestoreState() throws Exception {
    ValueBindingValueExpressionAdaptor adaptor1 = new ValueBindingValueExpressionAdaptor(
        new MockValueExpression("testValue1"));

    assertEquals("testValue1", saveRestoreState(adaptor1).getValue(
        facesContext));

    ValueBindingValueExpressionAdaptor adaptor2 = new ValueBindingValueExpressionAdaptor(
        new StateHolderTestValueExpression("testValue2"));

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

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

  public void testSerializeDeserialize() throws Exception {
    ValueBindingValueExpressionAdaptor adaptor1 = new ValueBindingValueExpressionAdaptor(
        new MockValueExpression("testValue1"));

    assertEquals("testValue1", serializeDeserialize(adaptor1).getValue(
        facesContext));

    ValueBindingValueExpressionAdaptor adaptor2 = new ValueBindingValueExpressionAdaptor(
        new StateHolderTestValueExpression("testValue2"));

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

            //Component was just created, so we add the Listener
            UIComponent component = componentTag.getComponentInstance();
            if (component instanceof AjaxSource) {
                AjaxListener listener;
                if(null != binding){
                   listener = new AjaxListenerHelper(new ValueBindingValueExpressionAdaptor(binding));
                } else {
        try {
                  String className = (String) type.getValue(FacesContext.getCurrentInstance().getELContext());
          listener = (AjaxListener) Class.forName(className).newInstance();
        } catch (Exception e) {
View Full Code Here

TOP

Related Classes of org.richfaces.webapp.taglib.ValueBindingValueExpressionAdaptor

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.