Class OrderByLink<S>

    • Constructor Detail

      • OrderByLink

        public OrderByLink​(String id,
                           S property,
                           ISortStateLocator<S> stateLocator)
        Constructor.
        Parameters:
        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 Detail

      • 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:
        Link
      • onSortChanged

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

        public final OrderByLink<Ssort()
        Re-sort data provider according to this link
        Returns:
        this
      • nextSortOrder

        protected SortOrder nextSortOrder​(SortOrder order)
        returns the next sort order when changing it
        Parameters:
        order - previous sort order
        Returns:
        next sort order