JSP TableTag Sorting
I'm working on a legacy system that uses JSPs. Specifically, there is a <display:table>
tag that allows the user to sort the columns of data. However, when the default tag is used, it sorts only alphabetically, by integer, or by double. I'm looking for a way to inject custom logic into the call stack so that I can use the dataType
attribute of <display:column>
to sort values like "$5,000,000.00" and not have "$5,100" listed before it.
I have a fully tested comparator that can be used by the sort mechanism.
I'm open to any ideas. These are the ones I have come up with:
- I've found some other implementations that take a
comparator
. I p开发者_C百科lan to test this first to see if it will work with what I have currently. This type of change is a large systematic change with testing implications, however. - Re-implement
TableTag
andColumnTag
. However, I can't find the actual source to see what these generally do. So much for the "Open Source" designation.
use tld file to get the class corresponding class and you can inject your method in that class.
精彩评论