You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Igor Vaynberg (JIRA)" <ji...@apache.org> on 2010/09/10 06:48:40 UTC
[jira] Updated: (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 ]
Igor Vaynberg updated WICKET-1195:
----------------------------------
Fix Version/s: 1.5-M3
(was: 1.5-M2)
> 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
> Fix For: 1.5-M3
>
>
> 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.