Hi, I have been looking a lot around the net, to solve my problem, but actually I feel like to be very far from solution. I have a
jsp page where the user can insert a monetary value, then when the page is submitted the
string should be converted in a BigDecimal value. At the beginning I had on jsp a dojo component:
and on a pojo I had just private BigDecimal currency; with set and get. I liked that situation because looked simple and I could validate currency right on client side. That solution was fine except with decimal numeric since I needed currency with comma decimal separator. So I had substituted the NumberTextBox with the following:
with this kind of dojo component I could not validate currency on client side. On server side on the pojo property I did:
This solution was fine on page submit, but then on the cancel submit of the following page to the page with currency inserted by the user, an exception was thrown TypeMismatchException. Could you please suggest me a best way to validate a currency (with decimal character and comma separator) user text field and to convert it in a BigDecimal variable? Thank you