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 List<Objecttype> getObjectListe() { List<Objecttype> sortedList = model.getObjects(); Collections.sort(sortedList, new Comparator<Objecttype>() { public int compare(Objecttype o1, Objecttype o2) { // compare the o1.getSort() value with o2.getSort() value here } }); return sortedList; } And this is the error I got: [ERROR] Uncaught exception escaped java.lang.UnsupportedOperationException: null at com.incowia.tkbase.unternehmenspflege.core.client.BaseReferenceList.toArray(BaseReferenceList.java:166) at java.util.Collections.sort(Collections.java:158) What have I to do, to sort my list? -Danny --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~----------~----~----~----~------~----~------~--~---