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/11/30 14:34:43 UTC

[jira] Created: (WICKET-1195) Let the user choose the default sorting of OrderByLink

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.


[jira] Updated: (WICKET-1195) Let the user choose the default sorting of OrderByLink

Posted by "Frank Bille Jensen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-1195?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Frank Bille Jensen updated WICKET-1195:
---------------------------------------

    Fix Version/s:     (was: 1.3.0-rc2)
                   1.3.0-rc3

> 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-rc3
>
>
> 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.


[jira] Updated: (WICKET-1195) Let the user choose the default sorting of OrderByLink

Posted by "Igor Vaynberg (JIRA)" <ji...@apache.org>.
     [ 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:     (was: 1.3.3)
                   1.5-M1

> 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-M1
>
>
> 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.


[jira] Commented: (WICKET-1195) Let the user choose the default sorting of OrderByLink

Posted by "Roy van Rijn (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-1195?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12587803#action_12587803 ] 

Roy van Rijn commented on WICKET-1195:
--------------------------------------

What do you want exacly? Its not 100% clear to me yet.

Something like this:
public final OrderByLink sort() 
{ 
   int oldDir = state.getPropertySortOrder(property); 
   int newDir = ISortState.ASCENDING; 
   if (oldDir == ISortState.ASCENDING) 
   { 
     newDir = ISortState.ASCENDING;
   }    
   return sort(ISortState.ASCENDING);
}

public final OrderByLink sort(int direction) 
{ 
   if(startWith!=ISortState.ASCENDING && startWith!=ISortState.DESCENDING)
   {
      // throw IllegalArgument
   } 
   if (isVersioned()) 
   { 
      // version the old state 
      Change change = new SortStateChange(); 
      addStateChange(change); 
   } 
   state.setPropertySortOrder(property, direction); 
   return this; 
} 

Or when you create a OrderByLink you give the default first sort-state, like this:
int firstSort= ISortState.DESCENDING;
OrderByLink(id, property, stateLocator, firstSort);

(then when you sort it goes from NONE to DESCENDING first)

> 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-M1
>
>
> 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.


[jira] Updated: (WICKET-1195) Let the user choose the default sorting of OrderByLink

Posted by "Thomas Jaeckle (JIRA)" <ji...@apache.org>.
     [ 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.


[jira] Updated: (WICKET-1195) Let the user choose the default sorting of OrderByLink

Posted by "Frank Bille Jensen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-1195?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Frank Bille Jensen updated WICKET-1195:
---------------------------------------

    Fix Version/s:     (was: 1.3.2)
                   1.3.3

> 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.3
>
>
> 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.


[jira] Updated: (WICKET-1195) Let the user choose the default sorting of OrderByLink

Posted by "Igor Vaynberg (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-1195?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Igor Vaynberg updated WICKET-1195:
----------------------------------

    Affects Version/s:     (was: 1.3.0-rc1)
                       1.3.1

> 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.1
>            Reporter: Thomas Jaeckle
>            Priority: Minor
>             Fix For: 1.3.0-rc3
>
>
> 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.


[jira] Updated: (WICKET-1195) Let the user choose the default sorting of OrderByLink

Posted by "Frank Bille Jensen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-1195?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Frank Bille Jensen updated WICKET-1195:
---------------------------------------

    Affects Version/s:     (was: 1.3.0-rc3)
                       1.3.0-rc1

> 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.1
>
>
> 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.


[jira] Updated: (WICKET-1195) Let the user choose the default sorting of OrderByLink

Posted by "Frank Bille Jensen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-1195?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Frank Bille Jensen updated WICKET-1195:
---------------------------------------

    Fix Version/s:     (was: 1.3.1)
                   1.3.2

> 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.2
>
>
> 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.


[jira] Updated: (WICKET-1195) Let the user choose the default sorting of OrderByLink

Posted by "Igor Vaynberg (JIRA)" <ji...@apache.org>.
     [ 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:     (was: 1.3.0-rc3)
                       1.3.1
    Affects Version/s:     (was: 1.3.1)
                       1.3.0-rc3

> 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-rc3
>            Reporter: Thomas Jaeckle
>            Priority: Minor
>             Fix For: 1.3.1
>
>
> 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.


[jira] Updated: (WICKET-1195) Let the user choose the default sorting of OrderByLink

Posted by "Igor Vaynberg (JIRA)" <ji...@apache.org>.
     [ 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:     (was: 1.5-M1)
                   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-M2
>
>
> 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.


[jira] Updated: (WICKET-1195) Let the user choose the default sorting of OrderByLink

Posted by "Jeremy Thomerson (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-1195?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jeremy Thomerson updated WICKET-1195:
-------------------------------------

    Fix Version/s:     (was: 1.5-M3)
                   1.5-M4

> 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-M4
>
>
> 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.


[jira] Updated: (WICKET-1195) Let the user choose the default sorting of OrderByLink

Posted by "Igor Vaynberg (JIRA)" <ji...@apache.org>.
     [ 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.