Uploaded image for project: 'Fluid Infusion'
  1. Fluid Infusion
  2. FLUID-3504

ChangeApplier has no convenient way to add items to an array in a model

    XMLWordPrintable

Details

    • Improvement
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 1.1.2, 2.0
    • None
    • Data Binder
    • None

    Description

      In cases where a model includes an array of some smaller objects, the ChangeApplier offers no convenient way to add several more of these smaller objects to that array all in one go. For example, if the form of the model includes

      {
        things: [
          { thung: "foo" },
          { thung: "bar" }
        ]
      }
      

      If I wish to add three more 'thung's to 'things', I must fire three separate requests for a change, using the fully qualified EL path into 'things' i.e. using knowledge of how many 'thung's there already are:

        applier.requestChange("things.2", newThungA);
        applier.requestChange("things.3", newThungB);
        applier.requestChange("things.4", newThungC);
      
      

      It would be nice to be able to do it all in one request, so that only one modelChanged event is fired.

      Attachments

        Activity

          People

            antranig Antranig Basman
            anastasia Anastasia Cheetham
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: