[portal-commits] JBoss Portal SVN: r11994 - branches/JBoss_Portal_2_6_6_JBPORTAL-2109/core-identity/src/main/org/jboss/portal/core/identity/ui/common.
portal-commits at lists.jboss.org
portal-commits at lists.jboss.org
Fri Sep 26 10:00:44 EDT 2008
Author: bdaw
Date: 2008-09-26 10:00:44 -0400 (Fri, 26 Sep 2008)
New Revision: 11994
Modified:
branches/JBoss_Portal_2_6_6_JBPORTAL-2109/core-identity/src/main/org/jboss/portal/core/identity/ui/common/IdentityUserBean.java
Log:
- sync fix from 2.6 branch
Modified: branches/JBoss_Portal_2_6_6_JBPORTAL-2109/core-identity/src/main/org/jboss/portal/core/identity/ui/common/IdentityUserBean.java
===================================================================
--- branches/JBoss_Portal_2_6_6_JBPORTAL-2109/core-identity/src/main/org/jboss/portal/core/identity/ui/common/IdentityUserBean.java 2008-09-26 13:28:52 UTC (rev 11993)
+++ branches/JBoss_Portal_2_6_6_JBPORTAL-2109/core-identity/src/main/org/jboss/portal/core/identity/ui/common/IdentityUserBean.java 2008-09-26 14:00:44 UTC (rev 11994)
@@ -30,6 +30,8 @@
import java.util.Map;
import java.util.ResourceBundle;
import java.util.Set;
+import java.util.Comparator;
+import java.util.Collections;
import javax.faces.context.FacesContext;
@@ -160,6 +162,7 @@
User u = (User) i.next();
list.add(new IdentityUIUser(u.getUserName()));
}
+ Collections.sort(list, new IdentityUIUserComparator());
return list;
}
@@ -283,4 +286,27 @@
return null;
}
+
+ protected class IdentityUIUserComparator implements Comparator
+ {
+
+
+ public int compare(Object o1, Object o2)
+ {
+ try
+ {
+ IdentityUIUser u1 = (IdentityUIUser)o1;
+ IdentityUIUser u2 = (IdentityUIUser)o2;
+
+ return u1.getUsername().compareToIgnoreCase(u2.getUsername());
+ }
+ catch(Throwable e)
+ {
+ //none
+ }
+ return 0;
+ }
+ }
+
+
}
More information about the portal-commits
mailing list