You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Martin Grigorov (JIRA)" <ji...@apache.org> on 2012/10/09 15:09:03 UTC
[jira] [Resolved] (WICKET-1195) Let the user choose the default
sorting of OrderByLink
[ https://issues.apache.org/jira/browse/WICKET-1195?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Martin Grigorov resolved WICKET-1195.
-------------------------------------
Resolution: Implemented
Implemented 2 years ago with:
commit f1f225f61fdfee67a0ea6603654e6e981dcdaaab
Author: Peter Ertl <pe...@apache.org>
Date: Wed Dec 1 19:12:18 2010 +0000
provide a few hooks for changing the sort order behavior of sortable data providers
git-svn-id: https://svn.apache.org/repos/asf/wicket/trunk@1041134 13f79535-47bb-0310-9956-ffa450edef68
> 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.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira