{ "id": "128789", "key": "ALOY-986", "fields": { "issuetype": { "id": "4", "description": "An improvement or enhancement to an existing feature or task.", "name": "Improvement", "subtask": false }, "project": { "id": "11113", "key": "ALOY", "name": "Alloy", "projectCategory": { "id": "10400", "description": "Tools for developing applications", "name": "Tooling" } }, "fixVersions": [], "resolution": { "id": "3", "description": "The problem is a duplicate of an existing issue.", "name": "Duplicate" }, "resolutiondate": "2014-04-10T17:27:46.000+0000", "created": "2014-04-08T08:44:08.000+0000", "priority": { "name": "Low", "id": "4" }, "labels": [ "Alloy", "bindings", "controller" ], "versions": [ { "id": "15759", "description": "Alloy 1.3.1", "name": "Alloy 1.3.1", "archived": false, "released": true, "releaseDate": "2014-02-10" } ], "issuelinks": [ { "id": "36553", "type": { "id": "10002", "name": "Duplicate", "inward": "is duplicated by", "outward": "duplicates" }, "outwardIssue": { "id": "125116", "key": "ALOY-931", "fields": { "summary": "Programmatic Binding API", "status": { "description": "The issue is open and ready for the assignee to start work on it.", "name": "Open", "id": "1", "statusCategory": { "id": 2, "key": "new", "colorName": "blue-gray", "name": "To Do" } }, "priority": { "name": "High", "id": "2" }, "issuetype": { "id": "2", "description": "A new feature of the product, which has yet to be developed.", "name": "New Feature", "subtask": false } } } } ], "assignee": null, "updated": "2018-03-07T22:25:54.000+0000", "status": { "description": "A resolution has been taken, and it is awaiting verification by reporter. From here issues are either reopened, or are closed.", "name": "Resolved", "id": "5", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "components": [], "description": "It would be really useful to be able to do something like the following.\r\n\r\nAt the moment it is impossible because all of the binding properties are 'creation only'.\r\n\r\nThe benefit of this is that you would be able to create reusable widgets that use Alloy Data Bindings.\r\n\r\n{code:javascript|title=index.js}\r\nvar listWindow = Alloy.createController('listWindow', {\r\n dataCollection: 'people',\r\n dataTransform: function(model){ \r\n model.fullName = model.firstName + ' ' + model.lastName;\r\n return model;\r\n },\r\n dataFilter: function(collection){\r\n return collection.where({firstName: 'Fred'});\r\n },\r\n rowTitle: \"{fullName}\"\r\n});\r\n{code}\r\n\r\n{code:xml|title=listWindow.xml}\r\n\r\n \r\n \r\n \r\n \r\n \r\n\r\n{code}\r\n\r\n{code:javascript|title=listWindow.js}\r\n$.table.dataCollection = Alloy.createCollection(args.dataCollection);\r\n$.table.dataTransform = args.dataTransform;\r\n$.table.dataFilter = args.dataFilter;\r\n$.tableRow.title = args.fullName;\r\n{code}", "attachment": [], "flagged": false, "summary": "Alloy: Allow 'binding' properties to be set on an Alloy view from a controller", "creator": { "name": "lsdriscoll", "key": "lsdriscoll", "displayName": "Lee Driscoll", "active": true, "timeZone": "Europe/London" }, "subtasks": [], "reporter": { "name": "lsdriscoll", "key": "lsdriscoll", "displayName": "Lee Driscoll", "active": true, "timeZone": "Europe/London" }, "environment": "Titanium 3.2.2 GA\r\nAlloy 1.3.1\r\n", "comment": { "comments": [ { "id": "300478", "author": { "name": "ragrawal", "key": "ragrawal", "displayName": "Ritu Agrawal", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Moving this improvement request to engineering for further evaluation and prioritization.", "updateAuthor": { "name": "ragrawal", "key": "ragrawal", "displayName": "Ritu Agrawal", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-04-10T06:02:44.000+0000", "updated": "2014-04-10T06:02:44.000+0000" }, { "id": "300526", "author": { "name": "skypanther", "key": "skypanther", "displayName": "Tim Poulsen", "active": true, "timeZone": "America/New_York" }, "body": "Great suggestion. This looks to be a duplicate of ALOY-931. I'm going to close this ticket, but link 931 to this one to save reference to your implementation suggestion.", "updateAuthor": { "name": "skypanther", "key": "skypanther", "displayName": "Tim Poulsen", "active": true, "timeZone": "America/New_York" }, "created": "2014-04-10T17:27:46.000+0000", "updated": "2014-04-10T17:27:46.000+0000" } ], "maxResults": 2, "total": 2, "startAt": 0 } } }