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

Requesting widgets/requires to receive reference to their parent


    • Type: New Feature
    • Status: Open
    • Priority: High
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Widgets


      Following the discussion in #ALOY-903 I'd like to request that widgets and required controllers receive their parent element as an argument.

      Why I need this... since Alloy 1.3.0

      As I've understood from Tony Lukasavage this is similar but not exactly the same as the internally used _parentSymbol. I think this is in particular true for proxy elements since Alloy 1.3.0. Earlier, these received the _parentSymbol property and were bound to their parent from within the widget. Since Alloy 1.3.0 however, the binding takes place in the controller that hosts the table and the widget no longer receives the property:

          $.__views.is = Alloy.createWidget("nl.fokkezb.infiniteScroll", "widget", {
              id: "is"
          onEnd ? $.__views.is.on("end", onEnd) : __defers["$.__views.is!end!onEnd"] = true;
          $.__views.ptr = Alloy.createWidget("nl.fokkezb.pullToRefresh", "widget", {
              id: "ptr"
          onEnd ? $.__views.ptr.on("release", onEnd) : __defers["$.__views.ptr!release!onEnd"] = true;
          $.__views.table = Ti.UI.createTableView({
              footerView: $.__views.is.getProxyPropertyEx("footerView", {
                  recurse: true
              headerPullView: $.__views.ptr.getProxyPropertyEx("headerPullView", {
                  recurse: true
              headerView: $.__views.ptr.getProxyPropertyEx("headerView", {
                  recurse: true
              id: "table"

      This is fine and I guess better then before, but I'm sure it's possible to still pass the parent back to the widget?




            • Assignee:
              skypanther Tim Poulsen
              fokkezb Fokke Zandbergen
            • Watchers:
              10 Start watching this issue


              • Created:

                Backbone Issue Sync

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

                  Git Integration