{ "id": "148693", "key": "AC-160", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "12217", "key": "AC", "name": "Appcelerator - INBOX", "projectCategory": { "id": "10000", "description": "", "name": "Customer Service" } }, "resolution": { "id": "11", "description": "Is not a bug in our product", "name": "Not Our Bug" }, "resolutiondate": "2015-11-26T05:41:33.000+0000", "created": "2015-06-11T15:53:47.000+0000", "labels": [ "alloy", "controller", "view" ], "versions": [], "issuelinks": [], "assignee": { "name": "mrahman", "key": "mrahman", "displayName": "Mostafizur Rahman", "active": true, "timeZone": "Asia/Dhaka" }, "updated": "2017-02-07T23:28:24.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": "14544", "name": "Alloy", "description": "Please enter tickets related to the Alloy here." } ], "description": "If I have a controller: mycontroller.js that does not have an associated view file: mycontroller.xml, then when I go to use that controller like this:\r\n\r\n{code:xml}\r\n\r\n \r\n\r\n{code}\r\n\r\nI get this Alloy build error:\r\n\r\n\r\n[ERROR] view \"mycontroller\" does not exist.\r\n[ERROR] The following paths were inspected:\r\n[ERROR] c:\\appc\\myapp\\app\\views\\mobileweb\\mycontroller\r\n[ERROR] c:\\appc\\myapp\\app\\views\\mycontroller\r\n[ERROR] Alloy compiler failed\r\n\r\n", "attachment": [], "flagged": false, "summary": "Cannot use Alloy controller that does not have an associated view", "creator": { "name": "brentonhouse", "key": "brentonhouse", "displayName": "Brenton House", "active": true, "timeZone": "America/Chicago" }, "subtasks": [], "reporter": { "name": "brentonhouse", "key": "brentonhouse", "displayName": "Brenton House", "active": true, "timeZone": "America/Chicago" }, "environment": "Windows 8.1\r\nAppcelerator SDK 4.0.0.GA", "comment": { "comments": [ { "id": "371141", "author": { "name": "jnaher", "key": "jnaher", "displayName": "Jebun Naher", "active": false, "timeZone": "Asia/Dhaka" }, "body": "Hello,\r\n\r\nWe tested this issue and this doesn't seem to be a bug. Views may be included in other views using the Require element. Specify the type attribute as 'view' and the src attribute should be the view file minus the '.xml' extension, and assign a unique value to the id attribute to reference the UI objects in the controller code. If you omit the type attribute, Alloy assumes it is implicitly set to 'view’. Please refer to [this|http://docs.appcelerator.com/platform/latest/#!/guide/Alloy_XML_Markup-section-35621528_AlloyXMLMarkup-RequireElement] and [this|http://docs.appcelerator.com/platform/latest/#!/guide/Alloy_Controllers].\r\n\r\n*Testing Environment:*\r\nAppcelerator Studio, build: 4.4.0.201511182122\r\nAppcelerator Command-Line Interface, version 5.1.0\r\nMac Osx: 10.9.5\r\nTi sdk : 5.1.0\r\nNode.js Version = 0.12.7\r\nJdk: 1.7.0_65\r\nEmulator: Samsung Galaxy S4(4.4.4)\r\n\r\n*Steps to test:*\r\n1. Create a classic project\r\n2. Run with the sample test case below\r\n\r\n*Test Case*\r\nindex.xml\r\n{code}\r\n\r\n \r\n \r\n \r\n\r\n{code}\r\n\r\nindex.js\r\n{code}\r\n$.index.open();\r\n{code}\r\n\r\nmycontroller.xml\r\n{code}\r\n\r\n\t\r\n\t\t\r\n\t\r\n\r\n{code}\r\n\r\nmycontroller.js\r\n{code}\r\nvar test = function(e) {\r\n alert(\"hi there\");\r\n};\r\n{code}\r\n\r\nThanks.", "updateAuthor": { "name": "mrahman", "key": "mrahman", "displayName": "Mostafizur Rahman", "active": true, "timeZone": "Asia/Dhaka" }, "created": "2015-11-23T11:36:16.000+0000", "updated": "2015-11-26T05:41:20.000+0000" } ], "maxResults": 2, "total": 2, "startAt": 0 } } }