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

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

      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.

        Acceptance criteria

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

                Created:
                Updated:
                Resolved:

                  Task DoD