[opencms-dev] Howto sort Resources

Marc Schlegel my.mailing.lists at gmx.de
Wed Feb 20 19:54:11 CET 2008


Thank you very much, your guess was almost right

Collections.sort(resources, new 
CmsPriorityTitleResourceComparator(cmsObject) );

regards
-- Marc

Shi Yusen schrieb:
> Perhaps you could try this:
>
> Collections.sort(resources, new
> CmsPriorityDateResourceComparator(cmsObject, true));
>
> Regards,
>
> Shi Yusen/Beijing Langhu Ltd.
>
> 在 2008-02-20三的 14:49 +0100,Marc Schlegel写道:
>   
>> No one an idea? I am still stuck at this point.
>>
>> Marc Schlegel schrieb:
>>     
>>> Hi
>>>
>>> I found out that there are two Comparator-Classes in the API 
>>> (CmsPriorityTitleResourceComparator and 
>>> CmsPriorityDateResourceComparator). But actually I don't have a clue how 
>>> to use this.
>>>
>>> List <CmsResource> resources= cmsObject.getResourcesInFolder("foobar", 
>>> CmsResourceFilter.DEFAULT);
>>> ...??...
>>>
>>> Thanks in advance
>>>
>>>
>>> _______________________________________________
>>> This mail is sent to you from the opencms-dev mailing list
>>> To change your list options, or to unsubscribe from the list, please visit
>>> http://lists.opencms.org/mailman/listinfo/opencms-dev
>>>       



More information about the opencms-dev mailing list