1

I use STS 3.3.0 with roo 1.2.4. this one use GWT 2.5.0

When I database reverse engineer my database some fields are typed "BigDecimal", mainly amount on financial accounts. When I want to build using mvn gwt:run , I got a build failure due to the following error:

[ERROR] BigDecimalBox cannot be resolved to a type

After search in google I've found that GWT manage the BigDecimal since 2.1.

Any Clue?

Phillux
  • 33
  • 6

1 Answers1

0

Weird, there is no class with that name in the namespace you point (com.google.gwt.user.client.ui.ValueBox) in fact there is no BigDecimalBox in the gwt-2.5.1 library.

Implement it in your project and change imports to match the namespace you use for it.

public class BigDecimalBox extends ValueBox<BigDecimal> {
  public BigDecimalBox() {
    super(Document.get().createTextInputElement(), BigDecimalRenderer.instance(),
      BigDecimalParser.instance());
  }
}
Manolo Carrasco Moñino
  • 9,723
  • 1
  • 22
  • 27
  • Thank you Manolo, It works, but I had to add also the BigDecimalRenderer and BigDecimalParser like in here: http://stackoverflow.com/questions/10413645/converting-string-to-bigdecimal-in-gwt – Phillux Aug 22 '13 at 11:45