Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    Rounding issue with SimpleType

    I'm struggling with a rounding problem when using a SimpleType that formats currency values based on locale. In this case I am executing a fetch to a datasource and using ListGrid.setData(response.getDataAsRecordList()) in the callback to populate a grid.

    If I stop in debug at the before populating the grid I can see that the value for the field in question is 214229.43, but by the time it is displayed in the grid it is 214229.44. Suspecting that my type formatter was the problem I stopped in debug at the first statement in my SimpleTypeFormatter. But by then the value had already been rounded to 214229.44.

    I know it has something to do with the SimpleType because if I remove that and change the field to a "float" the correct value is displayed.

    Can you help me understand where the rounding might be happening?

    #2
    That doesn't seem to be rounding unless there was additional precision after the .43.

    Maybe it's a core GWT bug? Does this happen in compiled mode?

    Comment


      #3
      Your hunch was right. It does not happen in compiled mode.

      Comment

      Working...
      X