{ "id": "112435", "key": "ALOY-611", "fields": { "issuetype": { "id": "5", "description": "The sub-task of the issue", "name": "Sub-task", "subtask": true }, "parent": { "id": "111605", "key": "ALOY-585", "fields": { "summary": "ListView XML markup integration", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "priority": { "name": "Critical", "id": "1" }, "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": [ { "id": "15402", "description": "Alloy 1.2.0, concurrent with SDK 3.1.0", "name": "Alloy 1.2.0", "archived": false, "released": true, "releaseDate": "2013-08-15" }, { "id": "15572", "description": "2013 Sprint 16", "name": "2013 Sprint 16", "archived": true, "released": true, "releaseDate": "2013-08-12" }, { "id": "15405", "description": "2013 Sprint 08", "name": "2013 Sprint 08", "archived": true, "released": true, "releaseDate": "2013-04-22" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2013-07-31T20:40:36.000+0000", "created": "2013-04-08T14:43:39.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "notable" ], "versions": [], "issuelinks": [], "assignee": null, "updated": "2018-03-07T22:25:39.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": " tags need to handle the {{isViewTemplate}} condition so that they can return ListView compatible code. Right now only explicit UI components are handled in the markup.\r\n\r\n{code:xml}\r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n{code}", "attachment": [], "flagged": false, "summary": "Add support to ListView", "creator": { "name": "tlukasavage", "key": "tlukasavage", "displayName": "Tony Lukasavage", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "tlukasavage", "key": "tlukasavage", "displayName": "Tony Lukasavage", "active": true, "timeZone": "America/Los_Angeles" }, "environment": null, "comment": { "comments": [ { "id": "247138", "author": { "name": "tlukasavage", "key": "tlukasavage", "displayName": "Tony Lukasavage", "active": true, "timeZone": "America/Los_Angeles" }, "body": "test app: https://github.com/appcelerator/alloy/tree/master/test/apps/ui/listview\r\n\r\nit includes required itemtemplates and listitems", "updateAuthor": { "name": "tlukasavage", "key": "tlukasavage", "displayName": "Tony Lukasavage", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-04-11T19:04:39.000+0000", "updated": "2013-04-11T19:04:39.000+0000" }, { "id": "264115", "author": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "body": "The test app does *not* include the very example of this ticket. It [does include|https://github.com/appcelerator/alloy/blob/master/test/apps/ui/listview/views/templates.xml] a test where the {{}} is on the same level as the other {{}}, but does not test for a {{}} used *IN* an {{}}, like in the description of this ticket.\r\n\r\nWhen using a {{}} inside an {{}} on the master version from Git, you'll get the following error during compile, which obviously should at least be caught to display a clear syntax error:\r\n\r\n{code}\r\n\r\n/usr/local/lib/node_modules/alloy/Alloy/commands/compile/parsers/Alloy.Abstract.ItemTemplate.js:60\r\n return childTemplates + '.push(' + state.item.symbol + ');';\r\n ^\r\nTypeError: Cannot read property 'symbol' of undefined\r\n at Object.CU.generateNodeExtended.post (/usr/local/lib/node_modules/alloy/Alloy/commands/compile/parsers/Alloy.Abstract.ItemTemplate.js:60:51)\r\n at Object.exports.parse (/usr/local/lib/node_modules/alloy/Alloy/commands/compile/parsers/base.js:14:17)\r\n at Object.exports.parse (/usr/local/lib/node_modules/alloy/Alloy/commands/compile/parsers/Alloy.Require.js:12:27)\r\n at Object.exports.generateNode (/usr/local/lib/node_modules/alloy/Alloy/commands/compile/compilerUtils.js:271:48)\r\n at Object.exports.generateNodeExtended (/usr/local/lib/node_modules/alloy/Alloy/commands/compile/compilerUtils.js:223:17)\r\n at /usr/local/lib/node_modules/alloy/Alloy/commands/compile/parsers/Alloy.Abstract.ItemTemplate.js:55:15\r\n at Array.forEach (native)\r\n at Function._.each._.forEach (/usr/local/lib/node_modules/alloy/Alloy/lib/alloy/underscore.js:79:11)\r\n at parse (/usr/local/lib/node_modules/alloy/Alloy/commands/compile/parsers/Alloy.Abstract.ItemTemplate.js:54:5)\r\n at Object.exports.parse (/usr/local/lib/node_modules/alloy/Alloy/commands/compile/parsers/base.js:11:17)\r\n at Object.exports.parse (/usr/local/lib/node_modules/alloy/Alloy/commands/compile/parsers/Alloy.Abstract.ItemTemplate.js:10:27)\r\n at Object.exports.generateNode (/usr/local/lib/node_modules/alloy/Alloy/commands/compile/compilerUtils.js:271:48)\r\n at Object.exports.generateNodeExtended (/usr/local/lib/node_modules/alloy/Alloy/commands/compile/compilerUtils.js:223:17)\r\n at /usr/local/lib/node_modules/alloy/Alloy/commands/compile/parsers/Ti.UI.ListView.js:57:17\r\n at Array.forEach (native)\r\n at Function._.each._.forEach (/usr/local/lib/node_modules/alloy/Alloy/lib/alloy/underscore.js:79:11)\r\n at /usr/local/lib/node_modules/alloy/Alloy/commands/compile/parsers/Ti.UI.ListView.js:48:6\r\n at Array.forEach (native)\r\n at Function._.each._.forEach (/usr/local/lib/node_modules/alloy/Alloy/lib/alloy/underscore.js:79:11)\r\n at parse (/usr/local/lib/node_modules/alloy/Alloy/commands/compile/parsers/Ti.UI.ListView.js:31:4)\r\n at Object.exports.parse (/usr/local/lib/node_modules/alloy/Alloy/commands/compile/parsers/base.js:11:17)\r\n at Object.exports.parse (/usr/local/lib/node_modules/alloy/Alloy/commands/compile/parsers/Ti.UI.ListView.js:17:27)\r\n at Object.exports.generateNode (/usr/local/lib/node_modules/alloy/Alloy/commands/compile/compilerUtils.js:271:48)\r\n at /usr/local/lib/node_modules/alloy/Alloy/commands/compile/compilerUtils.js:332:29\r\n at Array.forEach (native)\r\n at Function._.each._.forEach (/usr/local/lib/node_modules/alloy/Alloy/lib/alloy/underscore.js:79:11)\r\n at Object.exports.generateNode (/usr/local/lib/node_modules/alloy/Alloy/commands/compile/compilerUtils.js:327:5)\r\n at /usr/local/lib/node_modules/alloy/Alloy/commands/compile/index.js:496:28\r\n at Array.forEach (native)\r\n at Function._.each._.forEach (/usr/local/lib/node_modules/alloy/Alloy/lib/alloy/underscore.js:79:11)\r\n at parseAlloyComponent (/usr/local/lib/node_modules/alloy/Alloy/commands/compile/index.js:493:5)\r\n at /usr/local/lib/node_modules/alloy/Alloy/commands/compile/index.js:241:6\r\n at Array.forEach (native)\r\n at Function._.each._.forEach (/usr/local/lib/node_modules/alloy/Alloy/lib/alloy/underscore.js:79:11)\r\n at /usr/local/lib/node_modules/alloy/Alloy/commands/compile/index.js:233:6\r\n at Array.forEach (native)\r\n at Function._.each._.forEach (/usr/local/lib/node_modules/alloy/Alloy/lib/alloy/underscore.js:79:11)\r\n at module.exports (/usr/local/lib/node_modules/alloy/Alloy/commands/compile/index.js:229:4)\r\n at Object. (/usr/local/lib/node_modules/alloy/Alloy/alloy.js:91:46)\r\n at Module._compile (module.js:456:26)\r\n at Object.Module._extensions..js (module.js:474:10)\r\n at Module.load (module.js:356:32)\r\n at Function.Module._load (module.js:312:12)\r\n at Module.require (module.js:364:17)\r\n at require (module.js:380:17)\r\n at Object. (/usr/local/lib/node_modules/alloy/bin/alloy:3:1)\r\n at Module._compile (module.js:456:26)\r\n at Object.Module._extensions..js (module.js:474:10)\r\n at Module.load (module.js:356:32)\r\n at Function.Module._load (module.js:312:12)\r\n at Function.Module.runMain (module.js:497:10)\r\n at startup (node.js:119:16)\r\n at node.js:901:3\r\n{code}\r\n\r\nThanks to Matthew Lanham fro [bringing this under my attention|https://github.com/FokkeZB/nl.fokkezb.cachedImageView/issues/5].", "updateAuthor": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "created": "2013-07-31T06:30:30.000+0000", "updated": "2013-07-31T06:30:30.000+0000" }, { "id": "264132", "author": { "name": "tlukasavage", "key": "tlukasavage", "displayName": "Tony Lukasavage", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Thanks for the heads up guys. I'll address this specific situation.", "updateAuthor": { "name": "tlukasavage", "key": "tlukasavage", "displayName": "Tony Lukasavage", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-07-31T11:52:40.000+0000", "updated": "2013-07-31T11:52:40.000+0000" }, { "id": "264257", "author": { "name": "tlukasavage", "key": "tlukasavage", "displayName": "Tony Lukasavage", "active": true, "timeZone": "America/Los_Angeles" }, "body": "PR: https://github.com/appcelerator/alloy/pull/198\r\n\r\nAfter additional research, controllers within ItemTemplates don't make a great deal of sense given the entirely new structure used by the ListView API. There's no way to tie the UI components that compose the ItemTemplate back to the originating controller code. Due to this fact, the elements inside the will need to be basic Titanium API elements, not controllers or widgets for the time being. \r\n\r\nIf you use a or in an now, you'll get an error like this at compile time:\r\n\r\n{code}\r\n[ERROR] Error with at line 11\r\n[ERROR] cannot contain or elements.\r\n[ERROR] ListView currently only supports Titanium API elements:\r\n[ERROR] examples: