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

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

    XMLWordPrintable

Details

    • Yes
    • Saigon 73, UI Maintenance 3
    • 3

    Description

      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.

      Checklists

        Acceptance criteria

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                  Created:
                  Updated:
                  Resolved:

                  Checklists

                    Bug DoR
                    Task DoD

                    Time Tracking

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