Okey. This works fine:
childrenArrayList.add("dd"); -->Just for testing
childrenArrayList.add("cc"); -->Just for testing
childrenArrayList.add("aa"); -->Just for testing
childrenArrayList.add("bb"); -->Just for testing
//
//now sort the array
int size = childrenArrayList.size();
Collections.sort(childrenArrayList);
for (int i=0; i<size; i++) {
out.println(childrenArrayList.get(i));
}
.................
I get this result: aa,bb,cc,dd. But when I put my NodeData from the
paragraph, the sort-function doesn't work, even when T trim it.
.................
for (....) {
String node4sort = nodes.getNodeData("region").getString();
//Fill the ArrayList
childrenArrayList.add(node4sort.trim());
}
//now sort the array
int size = childrenArrayList.size();
Collections.sort(childrenArrayList);
for (int i=0; i<size; i++) {
out.println(childrenArrayList.get(i));
}
Why does this not work? Any hints?
Thanks
Christoph
----------------------------------------------------------------
for list details see
http://www.magnolia.info/en/magnolia/developer.html
----------------------------------------------------------------