Package org.apache.myfaces.trinidad.model

Examples of org.apache.myfaces.trinidad.model.SortCriterion


    UIXCollection table = (UIXCollection) tContext.getTable();
    List<SortCriterion> criteria = table.getSortCriteria();
    // We currently only show anything for the primary sort criterion
    if (criteria.size() > 0)
    {
      SortCriterion criterion = criteria.get(0);
      if (property.equals(criterion.getProperty()))
      {
        return criterion.isAscending() ? SORT_ASCENDING : SORT_DESCENDING;
      }
    }

    return table.isSortable(property) ? SORT_SORTABLE : SORT_NO;
  }
View Full Code Here


    Map<String, String> parameters)
  {
    String property = parameters.get(XhtmlConstants.VALUE_PARAM);
    Object state = parameters.get(XhtmlConstants.STATE_PARAM);
    boolean sortOrder = !XhtmlConstants.SORTABLE_ASCENDING.equals(state);
    SortCriterion criterion = new SortCriterion(property, sortOrder);

    SortEvent event =
      new SortEvent(table, Collections.singletonList(criterion));
    event.queue();
  }
View Full Code Here

    UIXCollection table = (UIXCollection) tContext.getTable();
    List<SortCriterion> criteria = table.getSortCriteria();
    // We currently only show anything for the primary sort criterion
    if (criteria.size() > 0)
    {
      SortCriterion criterion = criteria.get(0);
      if (property.equals(criterion.getProperty()))
      {
        return criterion.isAscending() ? SORT_ASCENDING : SORT_DESCENDING;
      }
    }

    return table.isSortable(property) ? SORT_SORTABLE : SORT_NO;
  }
View Full Code Here

    Map<String, String> parameters)
  {
    String property = parameters.get(XhtmlConstants.VALUE_PARAM);
    Object state = parameters.get(XhtmlConstants.STATE_PARAM);
    boolean sortOrder = !XhtmlConstants.SORTABLE_ASCENDING.equals(state);
    SortCriterion criterion = new SortCriterion(property, sortOrder);

    SortEvent event =
      new SortEvent(table, Collections.singletonList(criterion));
    event.queue();
  }
View Full Code Here

    Map<String, String> parameters)
  {
    String property = parameters.get(TrinidadRenderingConstants.VALUE_PARAM);
    Object state = parameters.get(TrinidadRenderingConstants.STATE_PARAM);
    boolean sortOrder = !TrinidadRenderingConstants.SORTABLE_ASCENDING.equals(state);
    SortCriterion criterion = new SortCriterion(property, sortOrder);

    SortEvent event =
      new SortEvent(table, Collections.singletonList(criterion));
    event.queue();
  }
View Full Code Here

    UIXCollection table = (UIXCollection) tContext.getTable();
    List<SortCriterion> criteria = table.getSortCriteria();
    // We currently only show anything for the primary sort criterion
    if (criteria.size() > 0)
    {
      SortCriterion criterion = criteria.get(0);
      if (property.equals(criterion.getProperty()))
      {
        return criterion.isAscending() ? SORT_ASCENDING : SORT_DESCENDING;
      }
    }

    return table.isSortable(property) ? SORT_SORTABLE : SORT_NO;
  }
View Full Code Here

    UIXCollection table = (UIXCollection) tContext.getTable();
    List<SortCriterion> criteria = table.getSortCriteria();
    // We currently only show anything for the primary sort criterion
    if (criteria.size() > 0)
    {
      SortCriterion criterion = criteria.get(0);
      if (property.equals(criterion.getProperty()))
      {
        return criterion.isAscending() ? SORT_ASCENDING : SORT_DESCENDING;
      }
    }

    return table.isSortable(property) ? SORT_SORTABLE : SORT_NO;
  }
View Full Code Here

        UIXCollection tableModel = (UIXCollectioncomponent;
        List<SortCriterion> sortCriteriaList = new ArrayList<SortCriterion>();
        String sortCriterion = (String) _value;
        Boolean isAscending  =
           new Boolean(sortCriterion.substring(sortCriterion.indexOf(" ")).trim());
        sortCriteriaList.add(new SortCriterion(
              sortCriterion.substring(0,sortCriterion.indexOf(" ")),
              isAscending.booleanValue()));
        tableModel.setSortCriteria(sortCriteriaList);
      }
      else
View Full Code Here

    Map<String, String> parameters)
  {
    String property = parameters.get(XhtmlConstants.VALUE_PARAM);
    Object state = parameters.get(XhtmlConstants.STATE_PARAM);
    boolean sortOrder = !XhtmlConstants.SORTABLE_ASCENDING.equals(state);
    SortCriterion criterion = new SortCriterion(property, sortOrder);

    SortEvent event =
      new SortEvent(table, Collections.singletonList(criterion));
    event.queue();
  }
View Full Code Here

  }

  private void _sort(CollectionModel model,
                     String property, boolean isAscending)
  {
    SortCriterion criterion = new SortCriterion(property, isAscending);
    model.setSortCriteria(Collections.singletonList(criterion));
  }
View Full Code Here

TOP

Related Classes of org.apache.myfaces.trinidad.model.SortCriterion

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.