You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Thomas Jaeckle (JIRA)" <ji...@apache.org> on 2007/12/03 08:23:43 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 ]

Thomas Jaeckle updated WICKET-1195:
-----------------------------------

    Fix Version/s: 1.3.0-rc2

> 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.3.0-rc2
>
>
> 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.