Type Parameters:
S - the type of the sorting parameter
All Implemented Interfaces:
Serializable, Iterable<Component>, IEventSink, IEventSource, IFeedbackContributor, IConverterLocator, IGenericComponent<Void,Link<Void>>, IMetadataContext<Serializable,Component>, IRequestListener, IHeaderContributor, IRequestableComponent, IHierarchical<Component>, IClusterable
Direct Known Subclasses:

public class OrderByLink<S> extends Link<Void>
A component that represents a sort header. When the link is clicked it will toggle the state of a sortable property within the sort state object.
Phil Kulak, Igor Vaynberg (ivaynberg)
See Also:
  • Constructor Details

    • OrderByLink

      public OrderByLink(String id, S property, ISortStateLocator<S> stateLocator)
      id - the component id of the link
      property - the name of the sortable property this link represents. this value will be used as parameter for sort state object methods. sort state object will be located via the stateLocator argument.
      stateLocator - locator used to locate sort state object that this will use to read/write state of sorted properties
  • Method Details

    • onClick

      public final void onClick()
      Description copied from class: Link
      Called when a link is clicked.
      Specified by:
      onClick in class Link<Void>
      See Also:
    • onSortChanged

      protected void onSortChanged()
      This method is a hook for subclasses to perform an action after sort has changed
    • sort

      public final OrderByLink<S> sort()
      Re-sort data provider according to this link
    • nextSortOrder

      protected SortOrder nextSortOrder(SortOrder order)
      returns the next sort order when changing it
      order - previous sort order
      next sort order