You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Piller Sébastien <pi...@hmcrecord.ch> on 2009/02/27 16:19:05 UTC
AjaxEditableLabel, "Double" type and comma / dot
Hi all,
I'd like to know if there is a way to make an AjaxEditableLabel accept
either a comma or a dot as decimal separator. That field has a "Double"
type.
It works well but I have to insert a "," as decimal separator (dots are
not allowed), which is quite unusual. I know this is related to Locale,
but is there an easy way?
Thanks!
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: AjaxEditableLabel, "Double" type and comma / dot
Posted by Piller Sébastien <pi...@hmcrecord.ch>.
Hi,
thank you for your quick answer.
I agree with what you said, but my users are a bit... hum, you know,
they have weird desires, and often ask for things they don't really
need. If I try to make them change their point of view, then they get
angry... so I've learned to close my mouth and do what they want, even
if it is stupid...
;)
Jonas a écrit :
> What you can do is to provide you own Converter to the Label
> and do you own number parsing/formatting.
> In my experience it makes sense to strictly follow the formats
> defined by the locales, otherwise user will complain about
> unexpected results when entering numbers, e.g. if they use
> the character that you would expect as decimal separator as
> grouping char.
>
>
> On Fri, Feb 27, 2009 at 4:19 PM, Piller Sébastien <pi...@hmcrecord.ch> wrote:
>
>> Hi all,
>>
>> I'd like to know if there is a way to make an AjaxEditableLabel accept
>> either a comma or a dot as decimal separator. That field has a "Double"
>> type.
>>
>> It works well but I have to insert a "," as decimal separator (dots are not
>> allowed), which is quite unusual. I know this is related to Locale, but is
>> there an easy way?
>>
>> Thanks!
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>> For additional commands, e-mail: users-help@wicket.apache.org
>>
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: AjaxEditableLabel, "Double" type and comma / dot
Posted by Jonas <ba...@gmail.com>.
What you can do is to provide you own Converter to the Label
and do you own number parsing/formatting.
In my experience it makes sense to strictly follow the formats
defined by the locales, otherwise user will complain about
unexpected results when entering numbers, e.g. if they use
the character that you would expect as decimal separator as
grouping char.
On Fri, Feb 27, 2009 at 4:19 PM, Piller Sébastien <pi...@hmcrecord.ch> wrote:
> Hi all,
>
> I'd like to know if there is a way to make an AjaxEditableLabel accept
> either a comma or a dot as decimal separator. That field has a "Double"
> type.
>
> It works well but I have to insert a "," as decimal separator (dots are not
> allowed), which is quite unusual. I know this is related to Locale, but is
> there an easy way?
>
> Thanks!
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org