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

public class HeadersToolbar<S> extends AbstractToolbar
Toolbars that displays column headers. If the column is sortable a sortable header will be displayed.
Author:
Igor Vaynberg (ivaynberg)
See Also:
  • Constructor Details

    • HeadersToolbar

      public HeadersToolbar(DataTable<T,S> table, ISortStateLocator<S> stateLocator)
      Constructor
      Type Parameters:
      T - the column data type
      Parameters:
      table - data table this toolbar will be attached to
      stateLocator - locator for the ISortState implementation used by sortable headers
  • Method Details

    • newSortableHeader

      protected WebMarkupContainer newSortableHeader(String headerId, S property, ISortStateLocator<S> locator)
      Factory method for sortable header components. A sortable header component must have id of headerId and conform to markup specified in HeadersToolbar.html
      Parameters:
      headerId - header component id
      property - property this header represents
      locator - sort state locator
      Returns:
      created header component