Allow to type dot instead of comma in bigDecimalField, auto fill comma (groupingSeperator) when typing in bigDecimalField

Environment: Jmix 2.1.3
Locale (En, Vi)
As the topic’s name, I want to allow to type dot (.) for decimalSeperator of bigDecimalField instead of comma (,) and I want it also autofill comma when typing a large number
such as (123456.789)
I want it autofill comma when typing
1 → 12 → 123 → 1,234 → 12,345 → 123,456 → allow to type dot → 123,456.789
image
Is there any way to reach to the solution?
thanks jmix support team

Hello, you can redefine number separators for you project in the message bundle properties file, see the documentation for details. Commas and dots will be put into place when the field loses focus.

I alr did it before your comment but it didnt work at all @t.musin

decimalFormat = #,##0.##

# Number separators
numberDecimalSeparator = .
numberGroupingSeparator = ,

Then I don’t quite understand your request. Could you please write some more examples of the input in the field and the expected displayed result after saving?

First, I cant type “dot” (for decimal separator) in bigDecimalField in the view. I want to type “123.456” instead of “123,456” (change decimal separator from comma to dot) in the view.
Second, I want the bigDecimalField in the view “auto-fill” the comma (grouping separator) when the input is a large number.

Have you tried removing the spaces before and after the = sign? There have been problems before caused by spaces in the property values.

1 Like

Thanks for your help but it also didnt work @chicojeff

image
It doesnt work at all, It only allow me to type (comma) in the bigDecimalField in my detail-view screen @t.musin

image
My list-view displayed exactly what I expected

I alr setup like this

numberDecimalSeparator=.
numberGroupingSeparator=,

But my bigDecimalField in my detail-view didnt even let me type dot

Why are the characters ‘a’ and ‘b’ specified in the separator properties? Are you sure you select Vietnamese language when logging into the application? If I try to reproduce your settings, I get “11b000a88777728” in my list (as expected).

Are these properties in messages_vi.properties and not messages_en.properties?

numberDecimalSeparator=.
numberGroupingSeparator=,

I’m trying to make it different to see so that i use ‘a’ and ‘b’ but nothing happened so i think the way to fix the issue is not the setup in the messages_vi.properties and messages_en.properties.
I alr setup

numberDecimalSeparator=.
numberGroupingSeparator=,

in both messages_vi.properties and messages_en.properties after using ‘a’ and ‘b’

as you can see, even if I use ‘a’ and ‘b’, the detail-view and list-view didnt get the effect from messages_vi.properties and messages_en.properties

Is there an additional pattern in your field, like in this topic of yours, but without the dot?

I’m using windows 10 (So it’s not relate to your mentioned post)
Jmix version: 2.1.3
Locale: en,vi

Here’s my entity

    @NumberFormat(pattern = "#,##0.########", decimalSeparator = ".", groupingSeparator = ",")
    @Column(name = "BUY_RATE_TRANSFER", precision = 20, scale = 8)
    @CurrencyValue(currency = "$")
    private BigDecimal buyRateTransfer;

My detail-view

            <bigDecimalField id="buyRateTransferField" property="buyRateTransfer" required="true">
                <validators>
                    <digits integer="20"
                            fraction="8"
                            message="Wrong format"/>
                    <positive message="Buy rate transfer field > 0"/>
                </validators>
            </bigDecimalField>

My messages properties

numberDecimalSeparator=.
numberGroupingSeparator=,

I cant even type dot(.) in the bigDecimalField
2024-02-16 18-11-18.rar (624.4 KB)
Here’s my demo (i try to type “dot” but it cant let me type)

Thanks for sharing these details of your problem, I have now reproduced it and created a new issue.

1 Like

Many thank to you. I am appreciate. Please mention to me when jmix team resolve this issue.