joerg 2003/07/10 13:05:38
Modified: src/scratchpad/src/org/apache/cocoon/generation
TraversableGenerator.java
Log:
it was "collection" in the original implementation too (sort order)
Revision Changes Path
1.5 +7 -9
cocoon-2.1/src/scratchpad/src/org/apache/cocoon/generation/TraversableGenerator.java
Index: TraversableGenerator.java
===================================================================
RCS file:
/home/cvs/cocoon-2.1/src/scratchpad/src/org/apache/cocoon/generation/TraversableGenerator.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- TraversableGenerator.java 10 Jul 2003 19:56:45 -0000 1.4
+++ TraversableGenerator.java 10 Jul 2003 20:05:37 -0000 1.5
@@ -105,9 +105,9 @@
* collection's immediate contents will be returned.
* <dt> <i>sort</i> (optional)
* <dd> Sort order in which the nodes are returned. Possible values are
- * name, size, time, directory. directory is the same as name,
- * except that the directory entries are listed first. System order is
- * default. (TODO: Does "directory" still make sense?)
+ * name, size, time, collection. collection is the same as name,
+ * except that the collection entries are listed first. System order
is
+ * default.
* <dt> <i>reverse</i> (optional)
* <dd> Reverse the order of the sort
* <dt> <i>dateFormat</i> (optional)
@@ -172,9 +172,8 @@
/**
* The sort parameter determines by which attribute the content of one
* collection should be sorted. Possible values are "name", "size",
"time"
- * and "directory", where "directory" is the same as "name", except that
- * directory entries are listed first.
- * (TODO: Does "directory" still make sense?)
+ * and "collection", where "collection" is the same as "name", except
that
+ * collection entries are listed first.
*/
protected String sort;
/** The reverse parameter reverses the sort order. <code>false</code> is
default. */
@@ -427,8 +426,7 @@
return new Long(((TraversableSource)
o1).getLastModified()).compareTo(new Long(((TraversableSource)
o2).getLastModified()));
}
});
- } else if (sort.equals("directory")) {
- //TODO: Does "directory" still make sense?
+ } else if (sort.equals("collection")) {
Arrays.sort(contents.toArray(), new Comparator() {
public int compare(Object o1, Object o2) {
TraversableSource ts1 = (TraversableSource) o1;