Let the user choose the default sorting of OrderByLink
------------------------------------------------------

                 Key: WICKET-1195
                 URL: https://issues.apache.org/jira/browse/WICKET-1195
             Project: Wicket
          Issue Type: Improvement
          Components: wicket
    Affects Versions: 1.3.0-rc1
            Reporter: Thomas Jaeckle
            Priority: Minor


currently sort() in OrderByLink looks like that:

public final OrderByLink sort()
{
   if (isVersioned())
   {
      // version the old state
      Change change = new SortStateChange();
      addStateChange(change);
   }
   ISortState state = stateLocator.getSortState();
   int oldDir = state.getPropertySortOrder(property);
   int newDir = ISortState.ASCENDING;
   if (oldDir == ISortState.ASCENDING)
   {
     newDir = ISortState.DESCENDING;
   }
   state.setPropertySortOrder(property, newDir);
   return this;
}

So by default the sorting is always ISortState.ASCENDING when you click on a 
OrderByLink that had an ISortState.NONE state before.
I would like to set the default sorting by myself (in the case I have, I want 
DESCENDING as default sorting).

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to