Re: AjaxEditableLabel, "Double" type and comma / dot
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 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-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: AjaxEditableLabel, "Double" type and comma / dot
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 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-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > > - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
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-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org