Well, you can try out my sorting. I've made a stringsort.java file that sorts strings. 
PS: Ignore the Quantity stuff, it's just something I need to handle big decimal 
numbers (to get the numbers correct with decimals and all that). I've made this 
stringsort to handle both dates, numbers, numbers with characters in it aso.

You use it by calling the ColumnsWrapper.java class in the display tag decorator 
(<display:table name="test" property="prop" scope="session" width="100%" pagesize="20" 
requestURI="result.jsp" export="true" 
decorator="com.om.condico.util.web.ColumnsWrapper">). Please note that this sorting 
only works on 0.8.5. I do not know why it does not work on 09 yet. Any clue?

Hope this helps you on the way!

Cheers,
Bard

----- Original Message -----
From: Franco Finstad <[EMAIL PROTECTED]>
Date: Mon, 25 Aug 2003 05:34:40 -0700 (PDT) 
To: [EMAIL PROTECTED]
Subject: [displaytag-user] Sorting a currency column

> I have a table that is displaying invoices and one of
> the columns is the invoice amount. I've used the
> decorator patter as suggested to format the amount as
> a currency. It works great, but it sorts as a string.
> I need it to sort numerically.
> 
> Any suggestions on how to fix this? Do I need to make
> my invoice objects implement comparable?
> 
> Any help is appreciated.
> 
> __________________________________
> Do you Yahoo!?
> Yahoo! SiteBuilder - Free, easy-to-use web site design software
> http://sitebuilder.yahoo.com
> 
> 
> -------------------------------------------------------
> This SF.net email is sponsored by: VM Ware
> With VMware you can run multiple operating systems on a single machine.
> WITHOUT REBOOTING! Mix Linux / Windows / Novell virtual machines
> at the same time. Free trial click here:http://www.vmware.com/wl/offer/358/0
> _______________________________________________
> displaytag-user mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/displaytag-user

Attachment: StringSort.java
Description: Binary data

Attachment: ColumnsWrapper.java
Description: Binary data

Reply via email to