Message Boards
Combination View Flat View Tree View
Threads [ Previous | Next ]
sort users based on the organization
toggle
sort users based on the organization
searh container
6/24/10 2:36 PM
I am using search: container tags to display all the users in a container , its working fine , the problem is liferay support sorting based on the first name, last name, and email address, but I need to sort based on the Organization name. I tried with search utilities method but facing the same. Please help me how to fix this issues.
Flag Flag
RE: sort users based on the organization
6/25/10 5:16 AM as a reply to Nagalingam Kasirajan.
Hi Nagelingam,

you can use bean Comparator to sort the organization name like this:

sorting:

BeanComparator comp = new BeanComparator("orgName");
Collections.sort(list, comp);


reverse order:


BeanComparator comp = new BeanComparator("orgName");
Collections.sort(list, comp);
Collections.reverse(list);


Hope this could resolve your issue. If not, please feel free to contact us.

Thanks,

Gnaniyar Zubair
zubair@mpowerglobal.com
Flag Flag
RE: sort users based on the organization
6/25/10 6:24 AM as a reply to Nagalingam Kasirajan.
Hi,

Go to /html/portlet/enterprise_admin/user/search_columns.jspf

Add this property orderable="<%= true %>" in liferay:ui tag like this,

<liferay-ui:search-container-column-text
href="<%= rowURL %>"
name="organizations"
orderable="<%= true %>"
>

Hope this helps.

Thanks,

Gnaniyar Zubair
Flag Flag
RE: sort users based on the organization
6/25/10 9:01 AM as a reply to Gnaniyar Zubair.
hi Gnaniyar Zubair

i have implemented your solution, its working fine.

Thanks for your reply.

Regards,
Nagalingam.k
Flag Flag