Package org.richfaces.model

Examples of org.richfaces.model.FilterField


    List<UIComponent> list = getChildren();
    for (Iterator<UIComponent> iterator = list.iterator(); iterator.hasNext();) {
      UIComponent component = iterator.next();
      if (component instanceof org.richfaces.component.UIColumn) {
        org.richfaces.component.UIColumn column = (org.richfaces.component.UIColumn) component;
        FilterField filterField = column.getFilterField();
        if (filterField != null) {
          filterFields.add(filterField);
        }
        SortField2 sortField = column.getSortField();
        if (sortField != null) {
View Full Code Here


    for (Iterator<UIComponent> iterator = list.iterator(); iterator
        .hasNext();) {
      UIComponent component = iterator.next();
      if (component instanceof org.richfaces.component.UIColumn) {
        org.richfaces.component.UIColumn column = (org.richfaces.component.UIColumn) component;
        FilterField filterField = column.getFilterField();
        if (filterField != null) {
          filterFields.add(filterField);
        }
        SortField2 sortField = column.getSortField();
        if (sortField != null) {
View Full Code Here

    super.setRendered(rendered);
  }
  //
 
  public FilterField getFilterField(){
    FilterField filterField = null;
    MethodExpression filterMethod = getFilterMethod();
    ValueExpression filterExpression = getValueExpression("filterExpression");
    ValueExpression filterBy = getValueExpression("filterBy");
    String filterValue = getFilterValue();
    if (filterMethod != null) {
      filterField = new FilterField(filterMethod);
    } else if (filterExpression != null) {
      filterField = new FilterField(filterExpression);
    } else if (filterBy != null) {
      filterField = new ExtendedFilterField(filterBy, filterValue);
    }
    return filterField;
  }
View Full Code Here

    List<UIComponent> list = getChildren();
    for (Iterator<UIComponent> iterator = list.iterator(); iterator.hasNext();) {
      UIComponent component = iterator.next();
      if (component instanceof org.richfaces.component.UIColumn) {
        org.richfaces.component.UIColumn column = (org.richfaces.component.UIColumn) component;
        FilterField filterField = column.getFilterField();
        if (filterField != null) {
          filterFields.add(filterField);
        }
        SortField2 sortField = column.getSortField();
        if (sortField != null) {
View Full Code Here

     */
    @Attribute
    public abstract String getWidth();

    public FilterField getFilterField() {
        FilterField field = null;
        Filter<?> filter = getFilter();
        ValueExpression filterExpression = getValueExpression("filterExpression");
        if (filter != null || filterExpression != null) {
            field = new FilterField(filterExpression, filter, getFilterValue());
        }
        return field;
    }
View Full Code Here

        };
        Object object = new Object();
        column.setValueExpression("filterExpression", expression);
        column.setFilter(filter);
        column.setFilterValue(object);
        FilterField filterField = column.getFilterField();
        Assert.assertEquals(expression, filterField.getFilterExpression());
        Assert.assertSame(filter, filterField.getFilter());
        Assert.assertEquals(object, filterField.getFilterValue());
    }
View Full Code Here

        Map<Object, SortField> sortFieldsMap = new LinkedHashMap<Object, SortField>();
        for (Iterator<UIComponent> iterator = columns(); iterator.hasNext();) {
            UIComponent component = iterator.next();
            if (component instanceof AbstractColumn && component.isRendered()) {
                AbstractColumn column = (AbstractColumn) component;
                FilterField filterField = column.getFilterField();
                if (filterField != null) {
                    filterFields.add(filterField);
                }
                SortField sortField = column.getSortField();
                if (sortField != null) {
View Full Code Here

    return rendered;
  }
  //
 
  public FilterField getFilterField(){
    FilterField filterField = null;
    MethodExpression filterMethod = getFilterMethod();
    ValueExpression filterExpression = getValueExpression("filterExpression");
    ValueExpression filterBy = getValueExpression("filterBy");
    String filterValue = getFilterValue();
    if (filterMethod != null) {
      filterField = new FilterField(filterMethod);
    } else if (filterExpression != null) {
      filterField = new FilterField(filterExpression);
    } else if (filterBy != null) {
      filterField = new ExtendedFilterField(filterBy, filterValue);
    }
    return filterField;
  }
View Full Code Here

   * @see junit.framework.TestCase#setUp()
   */
  protected void setUp() throws Exception {
    super.setUp();
    filterFields = new LinkedList<FilterField>();
    filterFields.add(new FilterField(keyTrue));
    filter = new WrappedBeanFilter(filterFields);
  }
View Full Code Here

    Map<Object, Object> props = new IdentityHashMap<Object, Object>();
    props.put(keyTrue, Boolean.TRUE);
    props.put(keyFalse, Boolean.FALSE);
    JavaBeanWrapper wrapper = new JavaBeanWrapper(obj, props);
    assertTrue(filter.accept(wrapper));
    filterFields.add(new FilterField(keyFalse));
    assertFalse(filter.accept(wrapper));
  }
View Full Code Here

TOP

Related Classes of org.richfaces.model.FilterField

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.