{ "id": "133119", "key": "ALOY-1082", "fields": { "issuetype": { "id": "2", "description": "A new feature of the product, which has yet to be developed.", "name": "New Feature", "subtask": false }, "project": { "id": "11113", "key": "ALOY", "name": "Alloy", "projectCategory": { "id": "10400", "description": "Tools for developing applications", "name": "Tooling" } }, "fixVersions": [], "resolution": { "id": "2", "description": "The problem described is an issue which will never be fixed.", "name": "Won't Fix" }, "resolutiondate": "2014-10-27T13:34:16.000+0000", "created": "2014-07-14T11:53:14.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [], "versions": [], "issuelinks": [], "assignee": { "name": "skypanther", "key": "skypanther", "displayName": "Tim Poulsen", "active": true, "timeZone": "America/New_York" }, "updated": "2014-10-27T13:34:16.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": [ { "id": "12326", "name": "XML", "description": "View XML and parsing" } ], "description": "h2. Description\r\n\r\nWhen creating a ListView in a widget, it is not possible to add the templates as children of the widget.\r\n\r\nh2. Sample\r\nThe ListView is created as a Widget. XML code:\r\n\r\n{code}\r\n\r\n\t\r\n\t\t\r\n\t\t\t\r\n\t\t\r\n\t\r\n\r\n{code}\r\n\r\nThe Templates should be added in the index.xml:\r\n\r\n{code}\r\n\r\n\t\r\n\t\t\r\n\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\r\n\t\t\r\n\t\r\n\r\n{code}", "attachment": [], "flagged": false, "summary": "Allows to be children of ", "creator": { "name": "dcassenti", "key": "dcassenti", "displayName": "Davide Cassenti", "active": true, "timeZone": "Europe/Berlin" }, "subtasks": [], "reporter": { "name": "dcassenti", "key": "dcassenti", "displayName": "Davide Cassenti", "active": true, "timeZone": "Europe/Berlin" }, "environment": null, "closedSprints": [ { "id": 248, "state": "closed", "name": "2014 Sprint 22 Alloy", "startDate": "2014-10-27T13:32:25.636Z", "endDate": "2014-11-10T13:32:00.000Z", "completeDate": "2014-11-10T15:54:03.714Z", "originBoardId": 124 } ], "comment": { "comments": [ { "id": "314175", "author": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "body": "[~dcassenti] Can you please give us an example use case?", "updateAuthor": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-07-15T16:43:48.000+0000", "updated": "2014-07-15T16:43:48.000+0000" }, { "id": "315095", "author": { "name": "skypanther", "key": "skypanther", "displayName": "Tim Poulsen", "active": true, "timeZone": "America/New_York" }, "body": "h4. lib/customlist.js\r\n\r\n{code}\r\nvar ListView = function(args) {\r\n this.view = Ti.UI.createListView(args);\r\n}\r\n\r\nListView.prototype.addMeASectionPlease = function(items) {\r\n var section = Ti.UI.createListSection();\r\n section.setItems(items);\r\n return this.view.appendSection(section);\r\n}\r\nListView.prototype.getView = function() {\r\n return this.view;\r\n}\r\n\r\nexports.createListView = function(args) {\r\n return new ListView(args);\r\n};\r\n{code}\r\n\r\nh4. index.xml\r\n\r\n{code}\r\n\r\n\t\r\n\t\t\r\n\r\n{code}\r\n\r\nh4. index.js\r\n\r\n{code}\r\n$.addButton.addEventListener('click', function() {\r\n\tvar items = [\r\n\t\t{title: {text:'Foo'}, properties: {template:'template', backgroundColor: 'purple'}},\r\n\t\t{title: {text:'Bar'}, properties: {template:'template'}},\r\n\t\t{title: {text:'Baz'}, properties: {template:'template'}}\r\n\t];\r\n\t$.mylist.addMeASectionPlease(items);\r\n})\r\n\r\n$.index.open();\r\n{code}", "updateAuthor": { "name": "skypanther", "key": "skypanther", "displayName": "Tim Poulsen", "active": true, "timeZone": "America/New_York" }, "created": "2014-07-21T19:56:50.000+0000", "updated": "2014-07-21T19:56:50.000+0000" }, { "id": "329506", "author": { "name": "skypanther", "key": "skypanther", "displayName": "Tim Poulsen", "active": true, "timeZone": "America/New_York" }, "body": "Closing, see ALOY-1102 for a solution", "updateAuthor": { "name": "skypanther", "key": "skypanther", "displayName": "Tim Poulsen", "active": true, "timeZone": "America/New_York" }, "created": "2014-10-27T13:34:16.000+0000", "updated": "2014-10-27T13:34:16.000+0000" } ], "maxResults": 17, "total": 17, "startAt": 0 } } }