Read and respond to this message at: 
https://sourceforge.net/forum/message.php?msg_id=4523023
By: pkrouse

After looking through the tutorials and online examples, I have come to the
forum to ask for help with this problem.  I am trying to get a numeric column
formatted as currency and totaled.  I am getting the following error when I
try to do this:
MessageFormatColumnDecorator.decorate(66) | Caught an illegal argument exception
while trying to format an object with pattern {0,number,currency}, returning
the unformatted value. Object class is {0,number,currency}

The table in the JSP starts off as:
<display:table name="orderList" cellspacing="0" cellpadding="0" requestURI=""
    id="orderList" pagesize="500" class="list" export="true"  sort="list"
decorator="org.displaytag.decorator.TotalTableDecorator" >

The offending column is defined as:
<display:column media="csv excel pdf html" property="totalPriceAmount"
escapeXml="true" sortable="false" title="Subtotal" headerClass="r" class="r"
format="{0,number,currency}" total="true" />

Now, here's the somwehat-weird part:  
The error is thrown and the HTML displayed has no formatting:
1018.6000, 
but the total that comes out is different:
1018.6

I would have expected the formatting to be the same on both.

Now here's the really weird part:
The format of the column in the excel spreadsheet looks just fine.  It's
$1,018.60.

The really really weird part is that the spreadsheet has no total at all, where
the HTML at least has one, but it's unformatted.


______________________________________________________________________
You are receiving this email because you elected to monitor this forum.
To stop monitoring this forum, login to SourceForge.net and visit: 
https://sourceforge.net/forum/unmonitor.php?forum_id=249318

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
displaytag-user mailing list
displaytag-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/displaytag-user

Reply via email to