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

MultiField shouldn't rely on index/count of the Vaadin child components to define property ids

    XMLWordPrintable

Details

    • Improvement
    • Resolution: Fixed
    • Major
    • 5.3
    • 5.3
    • forms

    Description

      MultiField internally maintains its entries as a PropertysetItem, whose entry keys are integers (0-indexed), and whose values are the subfields' properties.

      Currently, it calculates these integers based on count or index of its child components, which is rather fragile e.g. in case we want to have 'static' components in addition to the variable amount of subfields.

      In that case, delete removes the wrong property due to mismatch between propertyIds and subfield index within the parent component.

      We should carefully track what propertyId an entry is created with, and use it for deleting. In case we have to generate a new position manually, size of the itemPropertyIds collection is a better choice over componentCount.

      Checklists

        Acceptance criteria

        Attachments

          Issue Links

            Activity

              People

                mgeljic Mikaël Geljić
                mgeljic Mikaël Geljić
                Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved:

                  Checklists

                    Task DoD