Skip to Content
0
Former Member
Dec 04, 2008 at 11:12 PM

Sorting IResourceList problem

16 Views

Hello Everyone,

I have a problem with the sort method of the IResourceList class, i wrote the following code:

public static void sortResouceListByMenuDescription(IResourceList resourceList) throws Exception
{
     instanceDescriptionProperty();
     ResourcePropertyComparator rRPC = new ResourcePropertyComparator(pDescripcion , true);
     resourceList.sort(rRPC); 
}

That code sort a KM folder content, once it is sorted i printed it and got this list:

Cobranza Pura y Express
Envío de Enteros vía SIAC
Operación Central del Sistema de Pago electrónico de Uso Ampliado -SPEUA-   <--- Third
Operación Central de Otros Pasivos                                          <--- Fourth
Operación Central PEMEX
Recepción de Fondos de Instituciones vía SIAC

The third and fourth strings are wrong the four one should be first because "de" has a lower value than "del".

Can anyone help me to get the right sort?

Thank you in advanced.

Regards.