{ "id": "110736", "key": "ALOY-544", "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": "7", "description": "", "name": "Invalid" }, "resolutiondate": "2014-07-21T15:03:39.000+0000", "created": "2013-03-07T01:14:43.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [ "notable" ], "versions": [], "issuelinks": [], "assignee": null, "updated": "2018-03-07T22:28:25.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": [ { "id": "12329", "name": "Runtime", "description": "Generic bucket for uncategorized runtime issues" }, { "id": "12326", "name": "XML", "description": "View XML and parsing" } ], "description": "Alloy should allow the user to specify a custom namespace for each widget in XML which modifies the generated code to use the widgets within the specified namespace.\r\n\r\nAs an example, generates Ti.UI.createwindow(). The user should be able to specify , which Alloy would in turn use to generate mcd.createwindow(). This is useful if the user has their own custom framework with custom widget attributes.", "attachment": [], "flagged": false, "summary": "Ability to define a custom namespace to enable Alloy to generate custom widgets", "creator": { "name": "dsefton", "key": "dsefton", "displayName": "Daniel Sefton", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "dsefton", "key": "dsefton", "displayName": "Daniel Sefton", "active": true, "timeZone": "America/Los_Angeles" }, "environment": null, "closedSprints": [ { "id": 159, "state": "closed", "name": "2014 Sprint 15 Alloy", "startDate": "2014-07-21T15:07:15.114Z", "endDate": "2014-08-04T15:07:00.000Z", "completeDate": "2014-08-02T18:09:47.110Z", "originBoardId": 124 } ], "comment": { "comments": [ { "id": "241091", "author": { "name": "tlukasavage", "key": "tlukasavage", "displayName": "Tony Lukasavage", "active": true, "timeZone": "America/Los_Angeles" }, "body": "For reference, this technically works now so long as the custom API matches 1 to 1 with the Titanium API, as mentioned in the ticket's description. The issue is that there are a number of validation points in Alloy right now that assert certain things about the parent/child relationships in the XML. For example, The index.xml expects Ti.UI.Window, not some other namespace. There are a bunch of these checks throughout the various XML elements in Alloy/Titanium, so hunting those down and loosening the restrictions is what really needs to be done.", "updateAuthor": { "name": "tlukasavage", "key": "tlukasavage", "displayName": "Tony Lukasavage", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-03-07T01:51:27.000+0000", "updated": "2013-03-07T01:51:27.000+0000" }, { "id": "241110", "author": { "name": "dsefton", "key": "dsefton", "displayName": "Daniel Sefton", "active": true, "timeZone": "America/Los_Angeles" }, "body": "I see, ok. So it works for standard built-in widgets. I'd update the description, but I can't edit this report. The customer is now saying:\n\n\"Only concern is how to deal with the exceptional scenarios. Let me take a small example.\n\nLet's say I need to have a widget called 'LoginWidget' , I can't map this with customNamespace.createloginwidget()\"\n\nIs that a separate issue? Let me know if you'd like the customer to elaborate...", "updateAuthor": { "name": "dsefton", "key": "dsefton", "displayName": "Daniel Sefton", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-03-07T06:57:37.000+0000", "updated": "2013-03-07T06:57:37.000+0000" }, { "id": "241131", "author": { "name": "tlukasavage", "key": "tlukasavage", "displayName": "Tony Lukasavage", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Daniel in that case they should just create a widget", "updateAuthor": { "name": "tlukasavage", "key": "tlukasavage", "displayName": "Tony Lukasavage", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-03-07T14:05:08.000+0000", "updated": "2013-03-07T14:05:08.000+0000" }, { "id": "245189", "author": { "name": "miles339", "key": "miles339", "displayName": "Miles Matthias", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Tony, what about this situation with nested elements? Like:\r\n\r\n
\r\n \r\n \r\n\r\n\r\n\r\nWe're looking to build a custom form object where we can define the form elements in xml and its styles in the tss files, but do things like form.loadRecord(), form.getRecord(), form.loadValues(), form.getValues(), form.disable(), and form.enable(). (We'll probably open source this at some point.)\r\n\r\nI've thought about using a custom namespace, but is a widget sufficient? I haven't seen any examples of nesting objects in a call.", "updateAuthor": { "name": "miles339", "key": "miles339", "displayName": "Miles Matthias", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-04-02T15:22:36.000+0000", "updated": "2013-04-02T15:22:36.000+0000" }, { "id": "314938", "author": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "body": "This ticket can be closed as this works in Alloy 1.3.1+:\r\n\r\n*views/index.xml*\r\n{code}\r\n
\r\n \r\n \r\n\r\n{code}\r\n\r\n*lib/mycustomnamespace.js*\r\n{code}\r\nexports.createForm = function() {\r\n return Ti.UI.createView();\r\n};\r\n{code}\r\n\r\nYou just need to make sure that {{createForm}} returns a TiProxy element that has {{add()}} because the children will be added by calling this.", "updateAuthor": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "created": "2014-07-19T09:17:34.000+0000", "updated": "2014-07-19T09:17:34.000+0000" }, { "id": "314946", "author": { "name": "jkneen", "key": "jkneen", "displayName": "Jason Kneen", "active": false, "timeZone": "Africa/Ceuta" }, "body": "Agreed, this should be closed. The module attribute can be used to override any tag and return a custom element. See an example here https://github.com/jasonkneen/com.jasonkneen.tabdemo on how this is done with a TabGroup. For iOS, you get standard TabGroup, Tab, Window components - on Android you get a custom re-created TabGroup based on views. The XML is *identical* except for the module=\"tabGroup\" addition.", "updateAuthor": { "name": "jkneen", "key": "jkneen", "displayName": "Jason Kneen", "active": false, "timeZone": "Africa/Ceuta" }, "created": "2014-07-19T15:23:09.000+0000", "updated": "2014-07-19T15:23:09.000+0000" }, { "id": "315019", "author": { "name": "skypanther", "key": "skypanther", "displayName": "Tim Poulsen", "active": true, "timeZone": "America/New_York" }, "body": "Resolving, since this functionality already exists as described by the comments.", "updateAuthor": { "name": "skypanther", "key": "skypanther", "displayName": "Tim Poulsen", "active": true, "timeZone": "America/New_York" }, "created": "2014-07-21T15:03:39.000+0000", "updated": "2014-07-21T15:03:39.000+0000" }, { "id": "435327", "author": { "name": "emerriman", "key": "emerriman", "displayName": "Eric Merriman ", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Closing as invalid. If this is incorrect, please reopen.", "updateAuthor": { "name": "emerriman", "key": "emerriman", "displayName": "Eric Merriman ", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-03-07T22:28:25.000+0000", "updated": "2018-03-07T22:28:25.000+0000" } ], "maxResults": 10, "total": 10, "startAt": 0 } } }