Browse Source

forgot to commit

conversation
Keith Donald 16 years ago
parent
commit
b9682d7823
  1. 4
      org.springframework.context/src/main/java/org/springframework/ui/format/number/DecimalFormatter.java
  2. 4
      org.springframework.context/src/main/java/org/springframework/ui/format/number/IntegerFormatter.java
  3. 4
      org.springframework.context/src/main/java/org/springframework/ui/format/number/PercentFormatter.java

4
org.springframework.context/src/main/java/org/springframework/ui/format/number/DecimalFormatter.java

@ -40,6 +40,10 @@ public class DecimalFormatter implements Formatter<BigDecimal> { @@ -40,6 +40,10 @@ public class DecimalFormatter implements Formatter<BigDecimal> {
initDefaults();
}
public Class<BigDecimal> getFormattedObjectType() {
return BigDecimal.class;
}
public DecimalFormatter(String pattern) {
initDefaults();
formatFactory.setPattern(pattern);

4
org.springframework.context/src/main/java/org/springframework/ui/format/number/IntegerFormatter.java

@ -33,6 +33,10 @@ public class IntegerFormatter implements Formatter<Long> { @@ -33,6 +33,10 @@ public class IntegerFormatter implements Formatter<Long> {
private boolean lenient;
public Class<Long> getFormattedObjectType() {
return Long.class;
}
public String format(Long integer, Locale locale) {
if (integer == null) {
return "";

4
org.springframework.context/src/main/java/org/springframework/ui/format/number/PercentFormatter.java

@ -35,6 +35,10 @@ public class PercentFormatter implements Formatter<BigDecimal> { @@ -35,6 +35,10 @@ public class PercentFormatter implements Formatter<BigDecimal> {
private boolean lenient;
public Class<BigDecimal> getFormattedObjectType() {
return BigDecimal.class;
}
public String format(BigDecimal decimal, Locale locale) {
if (decimal == null) {
return "";

Loading…
Cancel
Save