2012/7/4 Steve Eynon <steve.ey...@alienfactory.co.uk>

> As I'm aware, BigDecimal's are not treated any differently to other
> Java Number objects.
>
> It's the NumericTranslator that handles the conversion, which palms
> most of it's work to NumericTranslatorSupportImpl which sets the
> following JavaScript symbols (your values may be different) which are
> used by the formatLocalizedNumber() JavaScript func in Tapestry.js.
>
> Tapestry.decimalFormatSymbols = {
>         "minusSign" : "-",
>         "groupingSeparator" : ",",
>         "decimalSeparator" : "."
> };
>
>
Looking up above values I found that tapestry js are handling
decimalSeparator as coma

Tapestry.decimalFormatSymbols = { "minusSign" : "-", "groupingSeparator" :
".", "decimalSeparator" : ","};

So, how I can change this?


> I would try using Floats (just for now) to see if they work correctly.
>
> Depending on where you're logging and how you're saving, the problem
> could be with your Database mapping. e.g. By default Hibernate doesn't
> preserve the BigDecimal scale.
>

Right now I'm logging on the Page java class and I'm not saving to database.


>
> Steve.
>
> (Side note: Urgh! BigDecimals are horrid horrid things! But yeah, for
> monetary values there's nothing else to use by default in Java. Sigh.)
>
>
:(


> --
> Steve Eynon
> -------------------------------
> "If at first you don't succeed,
>    so much for skydiving!"
>
>
>
> On 4 July 2012 07:40, arterzatij <arterza...@gmail.com> wrote:
> > Hello,
> >
> >     I am using a property of my entity as BigDecimal to manage prices in
> my
> > app.
> >
> >
> >
> >     When filled with data, I provide a number with point as decimal
> > separator, such as this "12.35". By submitting the information and
> > displaying the information in the logger, I am getting the following
> number
> > "1235", if I try to send a new number with a comma, the validator tells
> me
> > that "12.35" is not a number ...
> >
> > Looking at the API I can not find where to configure the type of decimal
> > separator ...
> >
> > My server is configured to recognize the decimal separator.
> > Spanish as a language.
> >
> > Any suggestions with this behavior among ... BigDecimal <=> tapestry
> >
> > --
> > View this message in context:
> http://tapestry.1045711.n5.nabble.com/BigDecimal-on-Tapestry-pages-tp5714260.html
> > Sent from the Tapestry - User mailing list archive at Nabble.com.
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> > For additional commands, e-mail: users-h...@tapestry.apache.org
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>


-- 
Saludos,

-------------------------------------------------------------------
"Nada que se consiga sin pena y sin trabajo
 es verdaderamente valioso."
                                          Joseph Addison
-------------------------------------------------------------------

ICE Ernesto Arteaga Zavala
Ingeniero de Desarrollo

Reply via email to