org.apache.myfaces.examples.listexample
Class SortableList

java.lang.Object
  extended by org.apache.myfaces.examples.listexample.SortableList
Direct Known Subclasses:
OpenDataList, PagedSortableCarList, SimpleSortableCarList

public abstract class SortableList
extends Object

Convenient base class for sortable lists.

Version:
$Revision: 472610 $ $Date: 2006-11-08 14:46:34 -0500 (Wed, 08 Nov 2006) $
Author:
Thomas Spiegl (latest modification by $Author: grantsmith $)

Constructor Summary
protected SortableList(String defaultSortColumn)
           
 
Method Summary
 String getSort()
           
 boolean isAscending()
           
protected abstract  boolean isDefaultAscending(String sortColumn)
          Is the default sort direction for the given column "ascending" ?
 void setAscending(boolean ascending)
           
 void setSort(String sort)
           
 void sort(String sortColumn)
           
protected abstract  void sort(String column, boolean ascending)
          Sort the list.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SortableList

protected SortableList(String defaultSortColumn)
Method Detail

sort

protected abstract void sort(String column,
                             boolean ascending)
Sort the list.


isDefaultAscending

protected abstract boolean isDefaultAscending(String sortColumn)
Is the default sort direction for the given column "ascending" ?


sort

public void sort(String sortColumn)

getSort

public String getSort()

setSort

public void setSort(String sort)

isAscending

public boolean isAscending()

setAscending

public void setAscending(boolean ascending)


Copyright © 2010 The Apache Software Foundation. All Rights Reserved.