Hi Jmix team,
I’m using Jmix 2.8.2 with TypedTextField<BigDecimal> and a ContainerValueSource.
I need dynamic decimal formatting (2, 5, or 14 decimal places depending on runtime conditions), so I’m assigning a custom datatype programmatically:
textField.setDatatype(adaptiveDatatype);
textField.setValueSource(new ContainerValueSource<>(dc, "defFldNum"));
However, the custom datatype is ignored once the ContainerValueSource is attached. After checking the source, I noticed that convertToPresentation() and convertToModel() always use the entity property’s datatype whenever an EntityValueSource exists, instead of the datatype assigned through setDatatype().
Is this the intended behavior?
If so, what is the recommended approach for applying a runtime/custom datatype while still using ContainerValueSource?