{ "id": "132441", "key": "ALOY-1179", "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": null, "resolutiondate": null, "created": "2014-07-01T02:45:15.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [ "TCSupportTriage", "inheritance" ], "versions": [], "issuelinks": [], "assignee": { "name": "skypanther", "key": "skypanther", "displayName": "Tim Poulsen", "active": true, "timeZone": "America/New_York" }, "updated": "2015-01-05T15:43:38.000+0000", "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" } }, "components": [ { "id": "12329", "name": "Runtime", "description": "Generic bucket for uncategorized runtime issues" }, { "id": "12326", "name": "XML", "description": "View XML and parsing" } ], "description": "I would like to be able to specify that subTopBar inherits from topBar by defining the baseController relationship in the XML of subTopBar rather than in its JavaScript code.\r\n\r\n --- original description follows ---\r\n\r\nThere is a super controller which name is 'topBar'.\r\nThere is a sub controller which inherit from 'topBar', its name is 'subTopBar'.\r\n'subTopBar' has no XML in any views, because I wanna reuse the view of 'topBar'.\r\n(exports.baseController = 'topBar' )\r\n\r\nsuch as the following .jade file described:\r\n{code}\r\nAlloy\r\n View\r\n Require#topBar(src='subTopBar', title='极速开户', top='0')\r\n View(backgroundColor=\"#f7f7f7\", top=\"44\")\r\n{code}\r\n\r\nWhen Alloy building, Alloy will try to find the view of the subcontroller when it was required in XML.\r\n\r\n1st\r\n I wanna reuse the view, but I cant create a XML in views directory.\r\n2nd\r\n I can still create it in JS by dynamic without any XML of subcontroller.\r\n\r\nIn a word:\r\n I am for fear to it is a bug.\r\n I think it would be better for you to check this issue, thx.\r\n", "attachment": [ { "id": "49436", "filename": "TestBaseController.zip", "author": { "name": "mdsb100", "key": "mdsb100", "displayName": "曹俊", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-07-02T02:27:43.000+0000", "size": 5526754, "mimeType": "application/zip" } ], "flagged": false, "summary": "Support defining controller inheritance in XML", "creator": { "name": "mdsb100", "key": "mdsb100", "displayName": "曹俊", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "mdsb100", "key": "mdsb100", "displayName": "曹俊", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "Alloy1.3.0 Ti3.2.1", "comment": { "comments": [ { "id": "311979", "author": { "name": "mpmiranda", "key": "mpmiranda", "displayName": "Mauro Parra-Miranda", "active": true, "timeZone": "America/Mexico_City" }, "body": "Hello @曹俊\r\n\r\nplease provide a testcase that shows this situation. \r\n\r\nThanks! ", "updateAuthor": { "name": "mpmiranda", "key": "mpmiranda", "displayName": "Mauro Parra-Miranda", "active": true, "timeZone": "America/Mexico_City" }, "created": "2014-07-02T01:04:47.000+0000", "updated": "2014-07-02T01:04:47.000+0000" }, { "id": "311998", "author": { "name": "mdsb100", "key": "mdsb100", "displayName": "曹俊", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Test case1 pass Alloy-build.\r\nTest case2 fail.", "updateAuthor": { "name": "mdsb100", "key": "mdsb100", "displayName": "曹俊", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-07-02T02:27:43.000+0000", "updated": "2014-07-02T02:27:43.000+0000" }, { "id": "311999", "author": { "name": "mdsb100", "key": "mdsb100", "displayName": "曹俊", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Hi Mauro Parra-Miranda.\r\nI upload 2 test case.\r\n\r\nEnvironment: Ti 3.2.1, Ti SDK 3.2.2, alloy 1.3.0.\r\n\r\nPlease run on iphone.\r\n\r\n\"testcase1\" pass Alloy-build.\r\n\r\n\"testcase2\" fail. \r\n[INFO] ----- MVC GENERATION -----\r\n[INFO] [global style] writing to cache...\r\n[INFO] [index.xml] view processing...\r\n[INFO] style: \"index.tss\"\r\n[INFO] view: \"index.xml\"\r\n[ERROR] view \"subController\" does not exist.\r\n\r\nPlease notice \"index.js\" in \"testcase1\" and notice \"index.xml\" in \"testcase2\"\r\n\r\nBecause \"testcase1\" work well and that there is not difference between \"testcase1\" and \"testcase2\" in truth.\r\nSo I think it is a bug or a feature.\r\n\r\nThx for your work.", "updateAuthor": { "name": "mdsb100", "key": "mdsb100", "displayName": "曹俊", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-07-02T02:38:24.000+0000", "updated": "2014-07-02T02:38:24.000+0000" }, { "id": "313623", "author": { "name": "morahman", "key": "morahman", "displayName": "Motiur Rahman", "active": true, "timeZone": "Asia/Dhaka" }, "body": "Hi,\r\n\r\nTestcase1 is well and testcase2 show error but both are logically same. But in testcase2 has little bit mistake, require file didn't exist in view. \r\n\r\nIn testcase2>>view>>index.xml and superController.xml but the reporter code is \r\n\r\n{code:title=index.xml}\r\n\r\n\t\r\n \r\n \r\n \r\n \r\n\t\r\n\r\n\r\n{code}\r\n\r\nActually code will be.\r\n\r\n{code:title=index.xml}\r\n\r\n\t\r\n \r\n \r\n \r\n \r\n\t\r\n\r\n{code}\r\n\r\n", "updateAuthor": { "name": "mpmiranda", "key": "mpmiranda", "displayName": "Mauro Parra-Miranda", "active": true, "timeZone": "America/Mexico_City" }, "created": "2014-07-12T06:10:42.000+0000", "updated": "2014-08-08T06:51:40.000+0000" }, { "id": "317655", "author": { "name": "mpmiranda", "key": "mpmiranda", "displayName": "Mauro Parra-Miranda", "active": true, "timeZone": "America/Mexico_City" }, "body": "Hello [~mdsb100]!\r\n\r\nLet me know if the correction above fixes your issue. \r\n\r\nBest Regards!", "updateAuthor": { "name": "mpmiranda", "key": "mpmiranda", "displayName": "Mauro Parra-Miranda", "active": true, "timeZone": "America/Mexico_City" }, "created": "2014-08-08T06:57:33.000+0000", "updated": "2014-08-08T06:57:33.000+0000" }, { "id": "317659", "author": { "name": "mdsb100", "key": "mdsb100", "displayName": "曹俊", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Hi [~morahman],\r\nIn fact, I want use subController. I can create subController in running time (testcase1). It does not pass the alloy-building if I write \"subController\" into XML (testcase2). This is problem. \r\nThe target of the two case is same!", "updateAuthor": { "name": "mdsb100", "key": "mdsb100", "displayName": "曹俊", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-08-08T07:13:57.000+0000", "updated": "2014-08-08T07:38:06.000+0000" }, { "id": "317661", "author": { "name": "mdsb100", "key": "mdsb100", "displayName": "曹俊", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Hi [~mpmiranda],\r\nWhen I define a subController in .xml like \"\" , I do not need to create a View which name is \"subController.xml\" because I inherit the view form superController.\r\n\r\nSo please let me pass the alloy-building.(Alloy try to find \"subController.xml\", and error.)", "updateAuthor": { "name": "mdsb100", "key": "mdsb100", "displayName": "曹俊", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-08-08T07:26:10.000+0000", "updated": "2014-08-08T07:37:31.000+0000" }, { "id": "321405", "author": { "name": "skypanther", "key": "skypanther", "displayName": "Tim Poulsen", "active": true, "timeZone": "America/New_York" }, "body": "Inheritance is currently supported when controllers are instantiated in the JavaScript files, but it is not currently supported with XML tags as testcase2 attempts to do. There's reference documentation at http://docs.appcelerator.com/titanium/latest/#!/guide/Alloy_Controllers-section-34636384_AlloyControllers-Inheritance and a sample app at https://github.com/appcelerator/alloy/tree/master/test/apps/advanced/inheritance \r\n\r\n[~mpmiranda] You can move this to Alloy. However, it is a feature request not a bug.", "updateAuthor": { "name": "skypanther", "key": "skypanther", "displayName": "Tim Poulsen", "active": true, "timeZone": "America/New_York" }, "created": "2014-09-02T19:15:33.000+0000", "updated": "2014-09-02T19:15:33.000+0000" } ], "maxResults": 10, "total": 10, "startAt": 0 } } }