Uploaded image for project: 'Magnolia UI'
  1. Magnolia UI
  2. MGNLUI-6896

TextFieldDefinition with "Double" or "Decimal" type should not round input values

XMLWordPrintable

    • Yes
    • Saigon 73, UI Maintenance 3
    • 3

      This is a copy of a resolved ticket MGNLUI-4066.. I experience the same behaviour on content apps/types that are of type Decimal and it was actually the same use case as in the ticket mentioned (saving coordinates) which then get rounded/modified.

      Steps to reproduce:

      1. Create a dialog with the following field:
            imageAltText:
              $type: textField
              i18n: true
              type: java.lang.Double
              converterClass: com.vaadin.data.converter.StringToDoubleConverter
        
      1. Add a component/page using this dialog

      Expected: Double value is stored correctly in JCR and display correctly when the dialog is reopened.
      Current behaviour: Double value is stored correctly in JCR but it is truncated to 3 decimals. When the dialog is reopened (if you save the dialog again (even without any change) then the truncated value is stored in JCR).

       

      Developer notes:

      This was controlled by deprecated rounding factory (in servlet?) in the old framework.

      Consider:

      • Use this deprecated factory (if works for v8 as well)
      • Propose alternative configuration (e.g. use String type and regexp validator for double values), documentation.

        Acceptance criteria

              sang.ngo Sang Ngo Huu
              nkhoa Khoa Nguyen
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved:

                  Bug DoR
                  Task DoD

                    Estimated:
                    Original Estimate - Not Specified
                    Not Specified
                    Remaining:
                    Remaining Estimate - Not Specified
                    Not Specified
                    Logged:
                    Time Spent - 1d 7h
                    1d 7h