Hi guys,
I'm facing a problem with DoubleItem and using setDecimalPrecision. In the latest version of SmartGWT 12.0 20190711 there are two issues:
Consider the following app:
Using SmartGwt-LGPL-12.0-20181113:

Ok, decimal precision is respected. When I select the first field of type float:

Ok, original precision of value is shown. But this does not work for the field of type localeFloat:

Field is selected, but original precision is not shown.
Switching to SmartGwt-LGPL-12.0-20190711, I get the following:

Decimal precision is not respected in any of the two fields. The field of type float is just showing all decimals and the field of type locale float is showing 3 decimals.
Select the localeFloat field and it shows me the number of decimals, that I specified in setDecimalPrecision - and not the original decimal precision of the value as expected.

Are there any workarounds for this?
Hope that you can help with this issue.
Best Regards
Rasmus
I'm facing a problem with DoubleItem and using setDecimalPrecision. In the latest version of SmartGWT 12.0 20190711 there are two issues:
- Setting type = float, decimalPrecision is not respected and all decimals are shown
- Setting type = localeFloat, decimalPrecision is not respected and it is only showing 3 decimals. Also, when I select the field, it does not show the original precision.
Consider the following app:
Code:
public class App implements EntryPoint { public void onModuleLoad() { DoubleItem doubleItem = new DoubleItem("float"); doubleItem.setType("float"); doubleItem.setValue(8.123456789); doubleItem.setDecimalPrecision(5); DoubleItem doubleItem2 = new DoubleItem("localeFloat"); doubleItem2.setType("localeFloat"); doubleItem2.setValue(8.123456789); doubleItem2.setDecimalPrecision(5); DynamicForm form = new DynamicForm(); form.setNumCols(3); form.setWidth100(); form.setItems(doubleItem, doubleItem2); Layout panel = new VLayout(); panel.setPadding(50); panel.setWidth100(); panel.setHeight100(); panel.setMembers(form); panel.draw(); } }
Using SmartGwt-LGPL-12.0-20181113:
Ok, decimal precision is respected. When I select the first field of type float:
Ok, original precision of value is shown. But this does not work for the field of type localeFloat:
Field is selected, but original precision is not shown.
Switching to SmartGwt-LGPL-12.0-20190711, I get the following:
Decimal precision is not respected in any of the two fields. The field of type float is just showing all decimals and the field of type locale float is showing 3 decimals.
Select the localeFloat field and it shows me the number of decimals, that I specified in setDecimalPrecision - and not the original decimal precision of the value as expected.
Are there any workarounds for this?
Hope that you can help with this issue.
Best Regards
Rasmus
Comment