{ "id": "118310", "key": "ALOY-787", "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": [ { "id": "15909", "description": "Alloy 1.5.0", "name": "Alloy 1.5.0", "archived": false, "released": true, "releaseDate": "2014-09-29" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2014-07-01T15:01:20.000+0000", "created": "2013-08-12T06:47:19.000+0000", "priority": { "name": "Low", "id": "4" }, "labels": [ "alloy", "qe-manualtest", "view", "widget" ], "versions": [ { "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" } ], "issuelinks": [ { "id": "39985", "type": { "id": "10000", "name": "Blocks", "inward": "is blocked by", "outward": "blocks" }, "inwardIssue": { "id": "134887", "key": "TIDOC-1846", "fields": { "summary": "Alloy Widgets: add documentation for ALOY-787", "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": "None", "id": "6" }, "issuetype": { "id": "2", "description": "A new feature of the product, which has yet to be developed.", "name": "New Feature", "subtask": false } } } } ], "assignee": { "name": "fmiao", "key": "fmiao", "displayName": "Feon Sua Xin Miao", "active": true, "timeZone": "America/Vancouver" }, "updated": "2015-12-04T08:47:23.000+0000", "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" } }, "components": [], "description": "Considering this view of a widget:\r\n\r\n{code:xml}\r\n\r\n \r\n \r\n \r\n\r\n{code}\r\n\r\nI would like the {{src}} attribute to automatically default to the widget it is used in. It's clean, better for my keyboard and one less statement to check if I decide to change my widget's name.", "attachment": [], "flagged": false, "summary": "A in a widget view should default to the current src", "creator": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "subtasks": [], "reporter": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "environment": "Alloy 1.2.0-alpha6", "closedSprints": [ { "id": 147, "state": "closed", "name": "2014 Sprint 13 Alloy", "startDate": "2014-06-23T14:36:08.509Z", "endDate": "2014-07-04T00:00:00.000Z", "completeDate": "2014-07-07T16:06:44.759Z", "originBoardId": 124 } ], "comment": { "comments": [ { "id": "299425", "author": { "name": "skypanther", "key": "skypanther", "displayName": "Tim Poulsen", "active": true, "timeZone": "America/New_York" }, "body": "[~fokke] Is this ticket still valid? I'm not sure I understand what you're asking for and why you need it. Can you provide a better description? Maybe even a mocked up project showing how you'd like it to work?", "updateAuthor": { "name": "skypanther", "key": "skypanther", "displayName": "Tim Poulsen", "active": true, "timeZone": "America/New_York" }, "created": "2014-03-31T22:33:53.000+0000", "updated": "2014-03-31T22:33:53.000+0000" }, { "id": "299478", "author": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "body": "[~skypanther], yes it's still valid.\r\n\r\nImagine a widget with these 2 views:\r\n\r\n*widgets/my.widget/views/widget.xml*\r\n{code}\r\n\r\n \r\n \r\n \r\n\r\n{code}\r\n\r\n*widgets/my.widget/views/other.xml*\r\n{code}\r\n\r\n \r\n\r\n{code}\r\n\r\nI'd like to be able to leave out the {{src}} attribute in the first view.\r\n\r\nWhy? Because I hate to repeat the id of the widget since a) I'm lazy b) It allows me to easily rename the widget.", "updateAuthor": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "created": "2014-04-01T11:20:02.000+0000", "updated": "2014-04-01T11:20:02.000+0000" }, { "id": "299963", "author": { "name": "skypanther", "key": "skypanther", "displayName": "Tim Poulsen", "active": true, "timeZone": "America/New_York" }, "body": "[~fokke] Widget tags are processed essentially as Require tags. In the case of widgets, the src attribute specifies the folder name from which to get the file specified with the name attribute. There are no properties available at runtime that give me this info automatically. The developer must supply it.", "updateAuthor": { "name": "skypanther", "key": "skypanther", "displayName": "Tim Poulsen", "active": true, "timeZone": "America/New_York" }, "created": "2014-04-04T22:37:06.000+0000", "updated": "2014-04-04T22:37:06.000+0000" }, { "id": "299964", "author": { "name": "skypanther", "key": "skypanther", "displayName": "Tim Poulsen", "active": true, "timeZone": "America/New_York" }, "body": "Closing as Won't Fix because we don't have a Can't Fix option.", "updateAuthor": { "name": "skypanther", "key": "skypanther", "displayName": "Tim Poulsen", "active": true, "timeZone": "America/New_York" }, "created": "2014-04-04T22:37:51.000+0000", "updated": "2014-04-04T22:37:51.000+0000" }, { "id": "299987", "author": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "body": "Thanks for trying anyway :)", "updateAuthor": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "created": "2014-04-05T11:16:08.000+0000", "updated": "2014-04-05T11:16:08.000+0000" }, { "id": "303061", "author": { "name": "tlukasavage", "key": "tlukasavage", "displayName": "Tony Lukasavage", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Re-opening as this could be implemented by injecting the widget name at compile time, then using it at runtime as a default if no explicit widget src is specified.", "updateAuthor": { "name": "tlukasavage", "key": "tlukasavage", "displayName": "Tony Lukasavage", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-04-30T16:00:46.000+0000", "updated": "2014-04-30T16:00:46.000+0000" }, { "id": "311573", "author": { "name": "fmiao", "key": "fmiao", "displayName": "Feon Sua Xin Miao", "active": true, "timeZone": "America/Vancouver" }, "body": "PR: https://github.com/appcelerator/alloy/pull/465\r\nTest app: https://github.com/feons/alloy/tree/ALOY-787/test/apps/testing/ALOY-787\r\n\r\nFunctional Test:\r\n\r\n 1. Run the test app on iOS, it should compile with no error\r\n Noted that in *widgets/my.widget/views/widget.xml*, src attribute for Widget tag is omitted.", "updateAuthor": { "name": "fmiao", "key": "fmiao", "displayName": "Feon Sua Xin Miao", "active": true, "timeZone": "America/Vancouver" }, "created": "2014-06-30T07:21:27.000+0000", "updated": "2014-06-30T07:21:27.000+0000" }, { "id": "311585", "author": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "body": "Thx [~fmiao]!", "updateAuthor": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "created": "2014-06-30T08:00:59.000+0000", "updated": "2014-06-30T08:00:59.000+0000" }, { "id": "311765", "author": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "body": "Tested on iOS Simulator with provided test app and works fine.", "updateAuthor": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "created": "2014-07-01T07:28:22.000+0000", "updated": "2014-07-01T07:28:22.000+0000" }, { "id": "311798", "author": { "name": "skypanther", "key": "skypanther", "displayName": "Tim Poulsen", "active": true, "timeZone": "America/New_York" }, "body": "PR tested and merged", "updateAuthor": { "name": "skypanther", "key": "skypanther", "displayName": "Tim Poulsen", "active": true, "timeZone": "America/New_York" }, "created": "2014-07-01T15:01:20.000+0000", "updated": "2014-07-01T15:01:20.000+0000" }, { "id": "319142", "author": { "name": "fcasali", "key": "fcasali", "displayName": "Federico Casali", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Verified working as expected on iPhone 5 iOS 7.1.2 - Android Nexus Galaxy 4.3 - MobileWeb\r\n\r\nTiSDK 3.4.0.v20140815142514\r\nAppcelerator Studio 3.3.1.201408140648\r\nCLI 3.4.0-dev\r\nAlloy 1.5.0-dev", "updateAuthor": { "name": "fcasali", "key": "fcasali", "displayName": "Federico Casali", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-08-18T18:38:58.000+0000", "updated": "2014-08-18T18:38:58.000+0000" }, { "id": "372052", "author": { "name": "falko", "key": "falko", "displayName": "Andrey Tkachenko", "active": true, "timeZone": "Europe/Moscow" }, "body": "It not work in Alloy 1.7.24\r\n\r\n{code}\r\n[ERROR] : Error with at line 5\r\n[ERROR] : Child element must be one of the following: [Alloy.Abstract.ItemTemplate]\r\n[ERROR] : Alloy compiler failed\r\n{code}\r\n\r\nInside `mywidget/views/widget.xml`\r\n{code:xml}\r\n\r\n \r\n \r\n \r\n \r\n \t\r\n \r\n\r\n{code}\r\n\r\nwidgets/mywidget/views/templates/showlistOne.xml\r\n\r\n{code:xml}\r\n\r\n\t\r\n\t\t\t\t\r\n\r\n{code}\r\n\r\n", "updateAuthor": { "name": "falko", "key": "falko", "displayName": "Andrey Tkachenko", "active": true, "timeZone": "Europe/Moscow" }, "created": "2015-12-03T12:51:59.000+0000", "updated": "2015-12-03T12:51:59.000+0000" }, { "id": "372053", "author": { "name": "falko", "key": "falko", "displayName": "Andrey Tkachenko", "active": true, "timeZone": "Europe/Moscow" }, "body": "Android", "updateAuthor": { "name": "falko", "key": "falko", "displayName": "Andrey Tkachenko", "active": true, "timeZone": "Europe/Moscow" }, "created": "2015-12-03T13:02:29.000+0000", "updated": "2015-12-03T13:02:29.000+0000" }, { "id": "372079", "author": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "body": "[~falko] Could you simplify the test case by not using templates, but instead simple views? The first view is missing the Alloy root element as well. Does the following fail as well for you?\r\n\r\n*mywidget/views/widget.xml*\r\n\r\n{code:xml}\r\n\r\n \r\n \r\n \r\n\r\n{code}\r\n\r\n*mywidget/views/foo.xml*\r\n\r\n{code:xml}\r\n\r\n \r\n\r\n{code}", "updateAuthor": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "created": "2015-12-03T18:37:16.000+0000", "updated": "2015-12-03T18:37:16.000+0000" }, { "id": "372103", "author": { "name": "falko", "key": "falko", "displayName": "Andrey Tkachenko", "active": true, "timeZone": "Europe/Moscow" }, "body": "I can't edit my comments for this issue to add `alloy` tag. \r\nMy example is quite simple.", "updateAuthor": { "name": "falko", "key": "falko", "displayName": "Andrey Tkachenko", "active": true, "timeZone": "Europe/Moscow" }, "created": "2015-12-03T22:26:13.000+0000", "updated": "2015-12-03T22:26:13.000+0000" }, { "id": "372115", "author": { "name": "fmiao", "key": "fmiao", "displayName": "Feon Sua Xin Miao", "active": true, "timeZone": "America/Vancouver" }, "body": "[~falko], {{Widget}} is currently not supported in {{Templates}}, a related ticket is here ALOY-1220.\r\n", "updateAuthor": { "name": "fmiao", "key": "fmiao", "displayName": "Feon Sua Xin Miao", "active": true, "timeZone": "America/Vancouver" }, "created": "2015-12-04T00:26:21.000+0000", "updated": "2015-12-04T00:26:21.000+0000" }, { "id": "372143", "author": { "name": "falko", "key": "falko", "displayName": "Andrey Tkachenko", "active": true, "timeZone": "Europe/Moscow" }, "body": "That ticket has not relation to this. Please read carefully. In my case Widget works as Require and not inside ItemTemplate.", "updateAuthor": { "name": "falko", "key": "falko", "displayName": "Andrey Tkachenko", "active": true, "timeZone": "Europe/Moscow" }, "created": "2015-12-04T07:11:24.000+0000", "updated": "2015-12-04T07:11:24.000+0000" }, { "id": "372150", "author": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "body": "[~falko] I'm afraid what you see *is* variation of ALOY-1220 and ALOY-787:\r\n\r\n*This does NOT work:*\r\n\r\n{code:xml}\r\n\r\n\t\r\n \r\n \r\n \r\n \r\n \t\r\n \r\n\t\r\n\r\n{code}\r\n\r\nAs does {{}} which both fail with:\r\n\r\n{code}\r\n[ERROR] Error with at line 4\r\n[ERROR] Child element must be one of the following: [Alloy.Abstract.ItemTemplate]\r\n{code}\r\n\r\n*This DOES work:*\r\n\r\n{code:xml}\r\n\r\n\t\r\n \r\n \r\n \r\n \r\n \t\r\n \r\n\t\r\n\r\n{code}\r\n\r\nAs does {{}}.\r\n\r\n[~fmiao] I guess the implementation of ALOY-787 is missing a case for when it's used in templates?", "updateAuthor": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "created": "2015-12-04T07:49:59.000+0000", "updated": "2015-12-04T07:49:59.000+0000" }, { "id": "372152", "author": { "name": "falko", "key": "falko", "displayName": "Andrey Tkachenko", "active": true, "timeZone": "Europe/Moscow" }, "body": "Fokke Zandbergen your simple example also not work.\r\n\r\n{code:xml|title=index.xml}\r\n\r\n\t\t\t\r\n\t\t\r\n\t\r\n\r\n{code}\r\n\r\n{code:xml|title=widgets/test/views/widget.xml}\r\n\r\n\t\r\n\r\n{code}\r\n\r\n\r\n{code:xml|title=widgets/test/views/foo.xml}\r\n\r\n\t\r\n\r\n{code}\r\n\r\n{noformat}\r\n\r\n[ERROR] : widget \"foo\" view \"widget\" does not exist.\r\n[ERROR] : The following paths were inspected:\r\n[ERROR] : /Users/falko/Documents/Appcelerator_Studio_Workspace/test123123/app/widgets/foo/views/android/widget\r\n[ERROR] : /Users/falko/Documents/Appcelerator_Studio_Workspace/test123123/app/widgets/foo/views/widget\r\n[ERROR] : /Users/falko/.appcelerator/install/5.2.0-55/package/node_modules/appc-cli-titanium/node_modules/alloy/widgets/foo/views/android/widget\r\n[ERROR] : /Users/falko/.appcelerator/install/5.2.0-55/package/node_modules/appc-cli-titanium/node_modules/alloy/widgets/foo/views/widget\r\n[ERROR] : Alloy compiler failed\r\n{noformat}\r\n", "updateAuthor": { "name": "falko", "key": "falko", "displayName": "Andrey Tkachenko", "active": true, "timeZone": "Europe/Moscow" }, "created": "2015-12-04T08:14:08.000+0000", "updated": "2015-12-04T08:14:08.000+0000" }, { "id": "372157", "author": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "body": "In the *widget.xml* you should have {{name=\"foo\"}} and not {{src=\"foo\"}}", "updateAuthor": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "created": "2015-12-04T08:22:32.000+0000", "updated": "2015-12-04T08:22:32.000+0000" }, { "id": "372158", "author": { "name": "falko", "key": "falko", "displayName": "Andrey Tkachenko", "active": true, "timeZone": "Europe/Moscow" }, "body": "@Fokke Zandbergen yes you right. But it does not work inside `Templates`.", "updateAuthor": { "name": "falko", "key": "falko", "displayName": "Andrey Tkachenko", "active": true, "timeZone": "Europe/Moscow" }, "created": "2015-12-04T08:33:50.000+0000", "updated": "2015-12-04T08:33:50.000+0000" }, { "id": "372159", "author": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "updateAuthor": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "created": "2015-12-04T08:47:23.000+0000", "updated": "2015-12-04T08:47:23.000+0000" } ], "maxResults": 24, "total": 24, "startAt": 0 } } }