[Bug #1273] Reimplement coerceToString as a workaround for the bug in Decimalbox.

FEA: ItEr75S04BugFixing
This commit is contained in:
Jacobo Aragunde Pérez 2011-11-28 18:52:53 +01:00
parent 8a3c9d1594
commit c27253af63

View file

@ -19,15 +19,14 @@
package org.libreplan.web.common;
import java.math.BigDecimal;
import java.text.DecimalFormatSymbols;
import org.zkoss.util.Locales;
import org.zkoss.zk.ui.WrongValueException;
import org.zkoss.zul.Decimalbox;
/**
* Same behavior as a {@link Decimalbox}, but it always interprets <b>.</b> as
* decimal separator, even when the locale uses a different separator.
* We also reimplement coerceToString to workaround the bug
* http://tracker.zkoss.org/browse/ZK-629.
*
* @author Óscar González Fernández <ogonzalez@igalia.com>
* @author Jacobo Aragunde Pérez <jaragunde@igalia.com>
@ -43,4 +42,8 @@ public class LenientDecimalBox extends Decimalbox {
super(value);
}
protected String coerceToString(Object value) {
return formatNumber(value, null);
}
}