Using @NumberFormat annotation with custom pattern at runtime

Hello,

Is it possible to use @NumberFormat (or another option) to set a number pattern at runtime? I’m using a groupTable with an editable number column, so the only way I found to format the number was using the @NumberFormat annotation on the entity field, but that seems fixed from coding time. (The goal is to have different formats per user)

BTW I noticed before implementing the @NumberFormat that the UI field was formatted by default to something (I think based on my locale), am I right? How is the default format for the general application configured?

I really appreciate any help you can provide.

Hello,

you can create a custom formatter for that. See documentation for an example
Regarding the second question, you can set the default regional format in the corresponding message bundle. Read more here