Hi
I create custom data type form money format. How can I set precision and scale
for this column. When I choose my custom data type in studio fields precision and scale are hiding.
Hi
I create custom data type form money format. How can I set precision and scale
for this column. When I choose my custom data type in studio fields precision and scale are hiding.
Have a look at the attached project. An an assumption for currency is that you want 2 decimal places and the most suitable datatype is BigDecimal. This is defined in the class CurrencyDatatype. On Screen, the format mask is applied on the fields without having to specify precision and scale again. The example below shows a fieldgroup currency field and a CurrencyField
Currency.zip (80.7 KB)
ok. Thanks for your answer. I also add tag sqlType
to metadate.xml
like below
<datatype id="Currency"
class="com.company.currency.entity.CurrencyDatatype"
sqlType="decimal(19,2)"/>
</datatypes>