Sort your paginated views by using lifts functions mapping.
The only down side with this style is that your links are session
specific and non-bookmarkable.
If you mix this trait in to a StatefulSnippet, it should work out the box.
Otherwise, implement 'registerThisSnippet.'

This method is called before the new page is served, to set up the state in advance.

This method is called before the new page is served, to set up the state in advance.
It is implemented by StatefulSnippet so you can just mix in StatefulSortedPaginatorSnippet to one;
or you can implement it yourself, using things like S.mapSnippet.

This method binds template HTML based according to the specified
configuration.

This method binds template HTML based according to the specified
configuration. You can reference this as a snippet method directly
in your template; or you can call it directly as part of your binding
code.

In addition to the classes bound in PaginatorSnippet, for
each header in the headers list, this will bind elements with that
class name and put a link in them with their contents.

For example, with a list of headers List("foo", "bar"), this would
bind the .foo element's contents to contain a link to a page that
renders that column sorted, as well as the .bar element's contents
to contain a link to a page that renders that column sorted.

Returns a new SortState based on a column index.
If the paginator is already sorted by that column, it
toggles the direction; otherwise the direction is ascending.
Note that this method does not alter the sort state in the
paginator; it only calculates the direction toggle.
Example usage:
sortedPaginator.sort = sortedPaginator.sortedBy(columns.indexOf(clickedColumn))