How to Alphabetically retrieve members of a list?

Posted by Neoryder on Stack Overflow See other posts from Stack Overflow or by Neoryder
Published on 2010-03-21T15:53:20Z Indexed on 2010/03/21 16:01 UTC
Read the original article Hit count: 432

Filed under:
|
|
|

I have an organization class

class Organization {
hasMany = [member:Members]
}

class Members {
belongsTo = organization
}

I'm printing all the members using

<ol>
<g:each in="${organizationInstance?.members?}" var="m">
    <li><g:link controller="members" action="show" id="${m.id}">${m?.encodeAsHTML()}</g:link></li>
</g:each>
</ol>

I want to sort the printing of members so that it would print alphabetically. any ideas?

© Stack Overflow or respective owner

Related posts about gorm

Related posts about grails