GeeCON Prague 2014*
The moose likes GWT and the fly likes How to sort the Generic List of values in a celltable in Java GWT? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Frameworks » GWT
Bookmark "How to sort the Generic List of values in a celltable in Java GWT?" Watch "How to sort the Generic List of values in a celltable in Java GWT?" New topic
Author

How to sort the Generic List of values in a celltable in Java GWT?

rajasekhar pasaleti
Greenhorn

Joined: Jul 20, 2012
Posts: 1
Hi all,

I have an absolute panel which contains one Cell table, as shown in the attachment which have list of columns..

Problem: Every time the list is randomly displayed, i want to sort the list. I have used the Collections.sort method like this,

Code:
@Override
public void onSuccess(Method pMethod, List<Met> pListMD) {
Collections.sort(pListMD,new Comparator<Met>() {

@Override
public int compare(Met o1, Met o2) {

return o1.getMetName().compareTo(o2.getMetName());
}
});

Note: Sorting is working fine in IE8 but not in Chrome and Firefox.

Please help me in sorting the list in Chrome and FF also.

Thanks in advance,
Raj



[Thumbnail for image_r8.png]

 
GeeCON Prague 2014
 
subject: How to sort the Generic List of values in a celltable in Java GWT?