Package org.ajax4jsf.tests

Examples of org.ajax4jsf.tests.MockValueExpression


     
    UISelectItem item4 = new UISelectItem();
    item4.setValue(new SelectItem("New York"));
      
      UISelectItems items = new UISelectItems();
      items.setValueExpression("value",new MockValueExpression(selectItems));
     
      iselect.getChildren().add(items);
      iselect.getChildren().add(item1);
      iselect.getChildren().add(item2);
      iselect.getChildren().add(item3);
View Full Code Here


        originalModel.setRowKey(key2);
     
    };
    try {
      model.walk(null, visitor, range, null);
      ValueExpression expression = new MockValueExpression(Boolean.TRUE);
      filterFields.add(new FilterField(expression));
      sortFields.add(new SortField2(expression, Ordering.ASCENDING));
      model.walk(null, visitor, range, null);
    } catch (IOException e) {
      fail(e.getMessage());
View Full Code Here

  /* (non-Javadoc)
   * @see junit.framework.TestCase#setUp()
   */
  protected void setUp() throws Exception {
    super.setUp();
    expression = new MockValueExpression(null);
    field = new FilterField(expression);
  }
View Full Code Here

  /* (non-Javadoc)
   * @see junit.framework.TestCase#setUp()
   */
  protected void setUp() throws Exception {
    super.setUp();
    expression = new MockValueExpression(null);
    ordering = Ordering.ASCENDING;
    field = new SortField2(expression, ordering);
  }
View Full Code Here

    }
  }

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

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

    ValueBindingValueExpressionAdaptor adaptor2 = new ValueBindingValueExpressionAdaptor(
View Full Code Here

        facesContext));
  }

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

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

    ValueBindingValueExpressionAdaptor adaptor2 = new ValueBindingValueExpressionAdaptor(
View Full Code Here

  protected Comparator<Object> createTestData_1_comparator() {
    return comparator1;
  }
 
  public void testSettersAndGetters()  throws Exception {
    column.setValueExpression("sortOrder", new MockValueExpression(Ordering.ASCENDING));
    assertEquals(Ordering.ASCENDING, column.getSortOrder());
   
    // reset value expression
    column.setValueExpression("sortOrder", null);
   
    column.setSortOrder(Ordering.DESCENDING);
    assertEquals(Ordering.DESCENDING, column.getSortOrder());

    column.setValueExpression("filterValue", new MockValueExpression(null));
    assertNull(column.getFilterValue());

    // reset value expression
    column.setValueExpression("filterValue", null);
   
View Full Code Here

   
    UISelectItems items = new UISelectItems();
      items.setValue(selectItems);
   
    pickList = (UIPickList)application.createComponent("org.richfaces.PickList");
    pickList.setValueExpression("value", new MockValueExpression(selected) );
   
      pickList.getChildren().add(item1);
      pickList.getChildren().add(item2);
      pickList.getChildren().add(item3);
      pickList.getChildren().add(item4);
      pickList.getChildren().add(items);
      form.getChildren().add(pickList);
     
      pickList2 = (UIPickList)application.createComponent("org.richfaces.PickList");
    pickList2.setValueExpression("value", new MockValueExpression(selectedList) );
    pickList2.getChildren().add(item1);
      pickList2.getChildren().add(item2);
      pickList2.getChildren().add(item3);
      pickList2.getChildren().add(item4);
      pickList2.getChildren().add(items);
View Full Code Here

   * @param el
   *            - ELContext
   * @return - created value expression
   */
  private ValueExpression getValueExpression(Object o, ELContext el) {
    ValueExpression exp = new MockValueExpression(o);
    return exp;
  }
View Full Code Here

    setupBean(beanName, bean);
   
    MockPageContext pageContext = new MockPageContext();
   
    KeepAliveTag tag = new KeepAliveTag();
    tag.setAjaxOnly(new MockValueExpression(ajaxOnly));
    tag.setPageContext(pageContext);
    tag.setBeanName(beanName);
   
    return tag;
  }
View Full Code Here

TOP

Related Classes of org.ajax4jsf.tests.MockValueExpression

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.