Sebastian Boccardi Messages: 47 Registered: September 2012 Location: Montevideo
Member
Hi,
I have some columns in a table with:
@Override
protected int getConfiguredMaxFractionDigits() {
return 4;
}
@Override
protected int getConfiguredMinFractionDigits() {
return 4;
}
But when i try to enter any number with that fraction, like 0.3333 it keeps rounding them up to 2 fraction digits. I tried a Double Column and a BigDecimal column.
Anyone tried this? I'm missing a configuration for that column?
From what I understood in your screenshot, you are using an editable Double Column...
Your problem is that the editingField does not consider the properties of the column (Format, MinFractionDigits, MaxFractionDigits...) when the field is instanciated. You can file a bug for this.
In my opininion the current workarround is to override execPrepareEdit(ITableRow). You can call super.execPrepareEdit(row) cast the IFormField to a IDoubleField and set your properties...
Let me know if you need an example.
---
I found an other bug with NumberField format and fraction digit: Bug 396979
Bug 396979 is not about "editable double-column properties -> double-field properties". It is just about AbstractNumberField<T> (where T can be a Float) getConfiguredFormat and fraction-digit being set even if the format is set.
I need to review the code modified with 392425 to see if your case "editable double-column properties -> double-field properties" is now covered.