on 04-07-2008 9:22 PM
I have setup a custom, predefined KM property that contains a currency value. I want the value to sort as a numeric value, rather than a string.
I have tried to implement a custom Comparator Class, by extending the class ResourcePropertyComparator. This is similar to the SAP class DefaultResourcePropertyComparator.
I then added the fully defined class name to the configuration field for Class Comparator in the Property Metadata. I also tried various other options, including removing the package name, etc.
When a sort is attempted, it appears as if the SAP code cannot find my new class. It throws the following exception:
java.lang.NullPointerException: Could not create a valid Comparator instance for the given metaname serco_transactions:serco_invoice_amount_due
at com.sapportals.wcm.rendering.collection.DefaultResourcePropertyComparator.setComparator(DefaultResourcePropertyComparator.java:52)
What am I doing wrong? How can I implement the custom comparator properly?
Thanks.
Bill
Hi Bill,
Try to implement the IResourcePropertyComparator interface:
import com.sapportals.wcm.service.propertyconfig.comparator.IResourcePropertyComparator;
public class MyCurrencyComparator implements IResourcePropertyComparator {
...
}
Regards,
Dietmar
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.