Variable translator for money

2022-08-09 Thread Adonique Pineda
I would like to provide a variable translator to TextField depending on the currency of the user. For example: In AppModule I have two money translators defined: configuration.add("moneyamount_0", *new* MoneyAmountTranslator( "moneyamount_0", 0, threadLocale, *false*)); configur

Re: Variable translator for money

2022-08-09 Thread Thiago H. de Paula Figueiredo
Hello! I'd try @Inject'ing FieldTranslatorSource and use its FieldTranslator createTranslator(ComponentResources componentResources, String translatorName) method. The type of the validate parameter of TextField and any other AbstractTextField subclass isn't Translator, but FieldTranslator. FieldT