1. #1
    Sencha User
    Join Date
    May 2008
    Location
    Germany
    Posts
    59
    Vote Rating
    0
    LukasP is on a distinguished road

      0  

    Default [FIXED] [beta3] TreeStore.sort

    [FIXED] [beta3] TreeStore.sort


    Hi,

    maybe I am missing something but TreeStore.sort(String field, SortDir sortDir) does not do anything.

    Store defines:

    Code:
    public void sort(String field, SortDir sortDir) {
        sortInfo.setSortField(field);
        sortInfo.setSortDir(sortDir);
        applySort();
    }
     
    ...
     
    protected void applySort() {
     
    }
    but TreeStore has a different signature for applySort:

    Code:
    protected void applySort(List<M> list) {
        if (storeSorter != null) {
          Collections.sort(list, new Comparator<M>() {
            public int compare(M m1, M m2) {
              return storeSorter.compare(TreeStore.this, m1, m2, sortInfo.getSortField());
            }
          });
        }
      }
    applySort(List) is called in onLoad() of TreeStore, however it is not working for me either...

    any ideas?

  2. #2
    Sencha - GXT Dev Team darrellmeyer's Avatar
    Join Date
    May 2007
    Location
    Washington, DC
    Posts
    2,242
    Vote Rating
    2
    darrellmeyer is on a distinguished road

      0  

    Default


    TreeStore and sorting was not fully implemented. The sort method has been removed from Store (remains on ListStore). To sort a TreeStore you now use setStoreSorter and optionally the new setSortInfo method on TreeStore. Fixes are in SVN.

  3. #3
    Sencha User
    Join Date
    May 2008
    Location
    Germany
    Posts
    59
    Vote Rating
    0
    LukasP is on a distinguished road

      0  

    Default


    Well, as I am part of the OSS-community: When will this code be available for me?

  4. #4
    Sencha - GXT Dev Team darrellmeyer's Avatar
    Join Date
    May 2007
    Location
    Washington, DC
    Posts
    2,242
    Vote Rating
    2
    darrellmeyer is on a distinguished road

      0  

    Default


    The new code will be available in the next release.

Thread Participants: 1