wicket.extensions.markup.html.repeater.data.sort
Interface ISortableDataProvider

All Superinterfaces:
IDataProvider, java.io.Serializable
All Known Implementing Classes:
EmptyDataProvider, SortableDataProvider

public interface ISortableDataProvider
extends IDataProvider

A data provider that can sort on it's columns.

Author:
Igor Vaynberg ( ivaynberg ), Phil Kulak

Nested Class Summary
static class ISortableDataProvider.SortState
          A simple class to represent the state of a sort field.
 
Method Summary
 void addSort(java.lang.String property)
          Adds the field to the end of the sort list.
 java.util.List getSortList()
           
 ISortableDataProvider.SortState getSortState(java.lang.String property)
          Gets the sort state of a property
 
Methods inherited from interface wicket.extensions.markup.html.repeater.data.IDataProvider
iterator, model, size
 

Method Detail

addSort

public void addSort(java.lang.String property)
Adds the field to the end of the sort list. If it already exists, it's first removed, then the ordering is flipped.

Parameters:
property - the name of the property to sort on

getSortList

public java.util.List getSortList()
Returns:
list of sort params (most recent first)

getSortState

public ISortableDataProvider.SortState getSortState(java.lang.String property)
Gets the sort state of a property

Parameters:
property - sort property to be checked
Returns:
1 if ascending, -1 if descending, 0 if none


Copyright © 2004-2006 . All Rights Reserved.