org.apache.wicket.extensions.markup.html.repeater.util
Class SortableTreeProvider<T>

java.lang.Object
  extended by org.apache.wicket.extensions.markup.html.repeater.util.SortableTreeProvider<T>
Type Parameters:
T -
All Implemented Interfaces:
Serializable, ISortStateLocator, ISortableTreeProvider<T>, ITreeProvider<T>, IDetachable, IClusterable

public abstract class SortableTreeProvider<T>
extends Object
implements ISortableTreeProvider<T>

Convenience implementation of a tree provider that can also act as a locator for a SingleSortState object.

Author:
svenmeier
See Also:
Serialized Form

Constructor Summary
SortableTreeProvider()
           
 
Method Summary
 void detach()
          Detaches model after use.
 SortParam<String> getSort()
          Returns current sort state
<S> ISortState<S>
getSortState()
           
 void setSort(SortParam<String> param)
          Sets the current sort state
 void setSort(String property, boolean ascending)
          Sets the current sort state
 void setSortState(ISortState<?> state)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.wicket.extensions.markup.html.repeater.tree.ITreeProvider
getChildren, getRoots, hasChildren, model
 

Constructor Detail

SortableTreeProvider

public SortableTreeProvider()
Method Detail

getSortState

public final <S> ISortState<S> getSortState()
Specified by:
getSortState in interface ISortStateLocator
Returns:
ISortState object
See Also:
ISortStateLocator.getSortState()

setSortState

public final void setSortState(ISortState<?> state)
Parameters:
state -
See Also:
ISortableDataProvider#setSortState(org.apache.wicket.extensions.markup.html.repeater.data.sort.ISortState)

getSort

public SortParam<String> getSort()
Returns current sort state

Returns:
current sort state

setSort

public void setSort(SortParam<String> param)
Sets the current sort state

Parameters:
param - parameter containing new sorting information

setSort

public void setSort(String property,
                    boolean ascending)
Sets the current sort state

Parameters:
property - sort property
ascending - sort direction

detach

public void detach()
Description copied from interface: IDetachable
Detaches model after use. This is generally used to null out transient references that can be re-attached later.

Specified by:
detach in interface IDetachable
See Also:
IDetachable.detach()


Copyright © 2006-2012 Apache Software Foundation. All Rights Reserved.