How to sort a list with objects on client side?

2009-03-19 Thread Danny Schimke
Hello! I have a list with objects I've got from backend-side. Every object has a getSort() method, which returns an integer value. I've never worked with Comparator before, but I tried like the following: public ListObjecttype getObjectListe() { ListObjecttype sortedList =

Re: How to sort a list with objects on client side?

2009-03-19 Thread gregor
Hi Danny, I think it may be because you have not implemented the compare method? One simple comparator I use for sorts looks like this: public class TermComparator implements Comparator { public int compare(Object term1, Object term2) { String first = ((Term)