You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Per Newgro <pe...@gmx.ch> on 2014/04/07 10:25:53 UTC
Locale in NumberTextField
Hello,
i have a question regarding the input conversion in NumberTextField (wicket 6.14)
This is the code in question:
/**
* Always use {@link Locale#ENGLISH} to parse the input.
*/
@Override
protected void convertInput()
{
IConverter<N> converter = getConverter(getNumberType());
try
{
setConvertedInput(converter.convertToObject(getInput(), Locale.ENGLISH));
}
catch (ConversionException e)
{
error(newValidationError(e));
}
}
Why is the used locale hardcoded here (Locale.ENGLISH). Shouldn't that be the session locale?
Is there any browser standard regarding this behavior (Couldn't find one so far)?
Thanks for your support
Per
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: Locale in NumberTextField
Posted by Martin Grigorov <mg...@apache.org>.
Hi,
See https://issues.apache.org/jira/browse/WICKET-3591
Martin Grigorov
Wicket Training and Consulting
On Mon, Apr 7, 2014 at 10:25 AM, Per Newgro <pe...@gmx.ch> wrote:
> Hello,
>
> i have a question regarding the input conversion in NumberTextField
> (wicket 6.14)
>
> This is the code in question:
>
> /**
> * Always use {@link Locale#ENGLISH} to parse the input.
> */
> @Override
> protected void convertInput()
> {
> IConverter<N> converter = getConverter(getNumberType());
>
> try
> {
>
> setConvertedInput(converter.convertToObject(getInput(), Locale.ENGLISH));
> }
> catch (ConversionException e)
> {
> error(newValidationError(e));
> }
> }
>
> Why is the used locale hardcoded here (Locale.ENGLISH). Shouldn't that be
> the session locale?
> Is there any browser standard regarding this behavior (Couldn't find one
> so far)?
>
> Thanks for your support
> Per
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>