Table Sorter – Java class used for table sorting (Web Dynpro Java) bug
After applying this document Table Sorter – Java class used for table sorting (Web Dynpro Java) – Web Dynpro Java – SCN Wiki
to create web dynpro table sorter I tried to sort result node with custom comparator map, here is code for comparator map creation (fig.1):
fig.1 Comparator map creation
After this I created table sorter object (fig. 2)
fig.2 Table sorter object instantiation
fig.3 Table sorter object sort method invocation
But my custom comparator compare method was not invoked, so after some investigation I found this bug in getComparator method of TableSorter reference implementaion:
So in getComparator method we some strange activity
constructor fill map with this type of key) and after that we are trying to get value by column.getId() – wich is String.
So because IWDTableColumn doesnt implement hashcode methode in such way that it will return hascode of column.getId() String, comparator reference on this line is null
so further code act like we didn’t provide any custom comparators.
Any comments is welcome, don’t know how to report about this bug to reference implementation author.