Fixes AR-238, AWC-505 and descending sort config issue

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@2337 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Gavin Cornwell
2006-02-09 21:53:49 +00:00
parent 55e2a13f4a
commit adcfbda4d6
9 changed files with 50 additions and 65 deletions

View File

@@ -37,7 +37,7 @@ public class ViewsElementReader implements ConfigElementReader
public static final String ELEMENT_VIEWDEFAULTS = "view-defaults";
public static final String ELEMENT_PAGESIZE = "page-size";
public static final String ELEMENT_SORTCOLUMN = "sort-column";
public static final String ELEMENT_SORTDESCENDING = "sort-descending";
public static final String ELEMENT_SORTDIRECTION = "sort-direction";
private static Log logger = LogFactory.getLog(ViewsElementReader.class);
@@ -95,15 +95,11 @@ public class ViewsElementReader implements ConfigElementReader
configElement.addDefaultSortColumn(pageName, column);
}
// get the sort descending option
Element sortDesc = page.element(ELEMENT_SORTDESCENDING);
if (sortDesc != null)
// get the sort direction option
Element sortDir = page.element(ELEMENT_SORTDIRECTION);
if (sortDir != null)
{
Boolean descending = new Boolean(sortDesc.getTextTrim());
if (descending.booleanValue() == true)
{
configElement.addDescendingSort(pageName);
}
configElement.addSortDirection(pageName, sortDir.getTextTrim());
}
// process the page-size element