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

type property doesn't work in Text Field

    XMLWordPrintable

Details

    • Bug
    • Resolution: Not an issue
    • Neutral
    • None
    • 6.2.3
    • None
    • None

    Description

      When using 6UI syntax to define a text field, type property doesn't work and throws an error.

      Steps to reproduce:

      1. Use the following field to store a Long value within a component dialog:
        text:
              class: info.magnolia.ui.field.TextFieldDefinition
              type: java.lang.Long
              label: Long
      2. Try opening the component editor and you will see following error:
        java.lang.ClassCastException: java.lang.Long cannot be cast to java.lang.String
      3. Try again replacing the class property with {{$type}:
        text:
              $type: textField
              type: java.lang.Long
              label: Long
      4. Retry opening the component dialog. Same error occurs.

      Expected results:
      Dialog opens correctly and a value of the configured type is stored.

      Development notes:
      It has been tested with SelectField and type property works ok, it seems that only happens with text field

      Checklists

        Acceptance criteria

        Attachments

          Activity

            People

              Unassigned Unassigned
              jayala Jonathan Ayala
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Checklists

                  Bug DoR
                  Task DoD