Using BigDecimal instead of Double solved my current problem.

Later I'll have to make something like a PercentageConverter. Actually that could be a generic conveter that multiplies/divides by a factor and applies a unit.

Thanks...
/Anders

Christian Essl wrote:
If you use BigDecimals this should work out of the box.

To provide your own format you can override getConverter() on the Label or for the whole application Application.getConverterFactory(). For details see the wicket page on custom converters:
http://www.wicket-wiki.org.uk/wiki/index.php/Using_custom_converters

Christian

On Sun, 20 Nov 2005 13:20:02 +0100, Anders Peterson <[EMAIL PROTECTED]> wrote:

With code like this

anItem.add(new Label("return", new PropertyModel(tmpInstrument, "diffusionProcess.localDrift")));

I'm trying to display small numbers.

1.1465448173051241E-12
1.2381223801081599E-6

In the generated page this just appears as "0" or "-0". I want it to be "0.0000012381223801081599"

How can I create Labels that know how to format these small numbers?

/Anders

--
http://ojalgo.org/

Mathematics, Linear Algebra and Optimisation with Java



-------------------------------------------------------
This SF.Net email is sponsored by the JBoss Inc.  Get Certified Today
Register for a JBoss Training Course.  Free Certification Exam
for All Training Attendees Through End of 2005. For more info visit:
http://ads.osdn.com/?ad_id=7628&alloc_id=16845&op=click
_______________________________________________
Wicket-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-user

Reply via email to