code: public void sortCategories(String sortParams, String filter) {
  
          List<CmsCategoryBean> categories;
          SortParams sort = SortParams.valueOf(sortParams);
          switch (sort) {
              case tree:
                  m_handler.onUpdateCategoriesTree(m_dialogBean.getCategories(), m_searchObject.getCategories());
                  break;
              case title_asc:
                  categories = getFilteredCategories(filter);
                  Collections.sort(categories, new CmsComparatorTitle(true));
                  m_handler.onUpdateCategoriesList(categories, m_searchObject.getCategories());
                  break;
              case title_desc:
                  categories = getFilteredCategories(filter);
                  Collections.sort(categories, new CmsComparatorTitle(false));
                  m_handler.onUpdateCategoriesList(categories, m_searchObject.getCategories());
                  break;
              case type_asc:
              case type_desc:
              case path_asc:
              case path_desc:
              case dateLastModified_asc:
              case dateLastModified_desc:
  
              default:
          }
      }
docs: Sorts the categories according to given parameters and updates the list.<p>
  
  @param sortParams the sort parameters
  @param filter the filter to apply before sorting