Sort a WebDynpro Node
I<Node> node = <the node to be sorted>; node.sortElements ( new Comparator() { public int compare(Object x, Object y) { /* passed values are of type I<Node>Element */ <AttributeType> ax = ((I<Node>Element) x).get<Attribute>(); <AttributeType> ay = ((I<Node>Element) y).get<Attribute>(); if (ax == null) { return ay == null ? 0 : 1; } return ax.compareTo(ay); } } );
page revision: 1, last edited: 22 Sep 2008 17:32