Hello,

I'm having trouble getting a WOString to format a java.math.BigDecimal. Here's an example of what I'm doing:

sumString : WOString {
        value = stats.sum;
        numberformat = numberFormat;
}

'stats.sum' returns a BigDecimal. 'numberFormat' returns the string '#.######'---my intention is to display the BigDecimal in standard (non-scientific) notation, to a maximum of 6 decimal places. If I have 'stats.sum' returning a value in scientific notation, say "2.8E +2", it passes through the number formatter unaffected, and the string "2.8E+2" is displayed on the page. If I change 'value' to 'stats.sum.toPlainString' and comment out the 'numberformat' line, I get the value in standard notation, but then if I have a number with, say, 10 decimal places, it obviously no longer gets truncated as desired. What's the best way around this?


--
Paul.

w  http://logicsquad.net/
h  http://paul.hoadley.name/


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to