Decimal Entry with up to 4 decimal place accuracy in User Interface

Decimal field only allow 2 decimal point accuracy and round the remaining digit. I need up to 4 decimal point. Please help Thanks in advance

Entity definition
@Column(name = “SELLBROKERAGE”, precision = 10, scale = 4)
private BigDecimal sellbrokerage;

UI definition

You need to specify @NumberFormat annotation:

@Column(name = "DEMO", precision = 19, scale = 4)
@NumberFormat(pattern = "#,##0.0000")
private BigDecimal demo;


1 Like

Perfect Thank-you!