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

Two "createOnEvent" components which are triggered by the same event cannot mutually refer

    XMLWordPrintable

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.0
    • 4.0
    • IoC System
    • None

    Description

      Currently there is no sense of "transactionality" in the IoC instantiation process beyond that of being rooted in a single component. As a result, two components which are registered as "createOnEvent" for the same event cannot make reference to each other via IoC references, after the fix to FLUID-5266.

      For example, the following setup will fail:

      fluid.defaults("examples.creator", {
          gradeNames: "fluid.component",
          events: {
              createIt: null
          },
          components: {
              dynamicOne: {
                  createOnEvent: "createIt",
                  type: "fluid.component",
                  options: {
                      value: 3
                  }
              },
              dynamicTwo: {
                  createOnEvent: "createIt",
                  type: "fluid.component",
                  options: {
                      value: "{creator}.dynamicOne.options.value"
                  }
              }
          }
      });
      

      The firing of the event "createIt" in this case will trigger the FLUID-5266 diagnostic for referring to a "createOnEvent" component before its construction time (in this case, 50% of the time, although the rate could be increased to 100% by creating a cyclic reference). The framework should be able to treat the construction of all components triggered by the same component as a single transactional unit.

      This issue was informally reported by colin some time ago during some implementation work for the Flocking audio synthesis engine.

      Attachments

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved: