Uploaded image for project: 'Alloy'
  1. Alloy
  2. ALOY-1564

Broken Require data-binding event translation. Custom events on Required views are being applied to the required root View instead of the required Controller itself, causing an error.

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: CLI Release 6.2.4
    • Component/s: Tooling
    • Labels:
      None
    • Story Points:
      3
    • Sprint:
      2017 Sprint 17 Tooling

      Description

      When requiring a view with data binding, for instance:

      <ScrollView dataCollection="clclients" layout="vertical" class="Size">
                  <Label text="{name}" class="header Size" top="10"/>
                  <Require src="products" name="{name}" onClick="doSomething" type="view"/>
              </ScrollView>
      

      the following errors is firing:

      [ERROR] :  Script Error {
      [ERROR] :      column = 18;
      [ERROR] :      line = 40;
      [ERROR] :      message = "undefined is not a function (evaluating '__alloyId146.getViewEx({\n                recurse: true\n            }).on(\"click\", doSomething)')";
      [ERROR] :      stack = "__alloyId148\ntriggerEvents\ntrigger\n_onModelEvent\ntriggerEvents\ntrigger\nset\nsuccess\n\nonload";
      [ERROR] :  }
      

      due to this processed code:

       doSomething ? __alloyId146.getViewEx({
                      recurse: true
                  }).on("click", doSomething) : __defers["__alloyId146.getViewEx({recurse:true})!click! doSomething"] = true;
      

      which should be:

      doSomething ? __alloyId146.on("click", doSomething) : __defers["__alloyId146!click! doSomething"] = true;
      

        Attachments

          Activity

            People

            • Assignee:
              fmiao Feon Sua Xin Miao
              Reporter:
              bgarcia Brian García
            • Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Backbone Issue Sync

                • Backbone Issue Sync is enabled for your project, but we do not have any synchronization info for this issue.

                  Git Integration