{ "id": "162097", "key": "ALOY-1511", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "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": "2017-02-23T06:40:54.000+0000", "created": "2016-07-26T15:05:21.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [ "Alloy", "model", "view" ], "versions": [], "issuelinks": [], "assignee": { "name": "emerriman", "key": "emerriman", "displayName": "Eric Merriman ", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2017-02-23T06:40:54.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": "13605", "name": "Models" } ], "description": "I am trying to add alloy model view binding in Listview and as per my requirement, I need to show checkmark for list items dynamically based on business logic. I tried the below code but it doesn't show me checkmark for listitems (There is no error or warning in console),\r\n\r\nView\r\n\r\n~~~\r\n \r\n \r\n \r\n \r\n \r\n~~~\r\n\r\nController\r\n\r\n~~~\r\n\r\n var query = \"SELECT id, name, CASE WHEN id IN (64) THEN 'Ti.UI.LIST_ACCESSORY_TYPE_CHECKMARK' ELSE 'Ti.UI.LIST_ACCESSORY_TYPE_NONE' END AS actype FROM g_occupation WHERE name LIKE 'S%' LIMIT 20\";\r\n console.log(query); \r\n occupation.fetch({query: query});\r\n\r\n~~~\r\n\r\nI have verified the sql query in SQLitemanger separately and it's giving me expected result.\r\n\r\nExpected - It should show checkmark for all listitems which has matching id in professionIndex array.", "attachment": [], "flagged": false, "summary": "Alloy Model-View binding not working for ListItem accessoryType property.", "creator": { "name": "naren", "key": "naren", "displayName": "Narendra Raorane", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "naren", "key": "naren", "displayName": "Narendra Raorane", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "Appc SDK - 5.3.1\r\nAppcelerator Studio - 4.6.0\r\nAppc CLI - 5.3.1\r\nAlloy - 1.6.0\r\nOperating System\r\n Name = Mac OS X\r\n Version = 10.11.5\r\n Architecture = 64bit\r\n # CPUs = 4\r\n Memory = 8589934592\r\nNode.js\r\n Node.js Version = 4.2.2\r\n npm Version = 2.14.7\r\nTitanium CLI\r\n CLI Version = 5.0.8\r\nTitanium SDK\r\n SDK Version = 5.3.1.GA\r\nSupport/Titanium/mobilesdk/osx/5.3.1.GA\r\n Target Platform = iphone\r\n", "comment": { "comments": [ { "id": "392203", "author": { "name": "sdarda", "key": "sdarda", "displayName": "Sharif AbuDarda", "active": false, "timeZone": "Asia/Dhaka" }, "body": "Hello, The sample code you provided is not sufficient enough. Please provide a full reproducible code that we can test to regenerate the issue. Thanks.", "updateAuthor": { "name": "sdarda", "key": "sdarda", "displayName": "Sharif AbuDarda", "active": false, "timeZone": "Asia/Dhaka" }, "created": "2016-08-02T15:35:17.000+0000", "updated": "2016-08-02T15:35:17.000+0000" }, { "id": "392281", "author": { "name": "naren", "key": "naren", "displayName": "Narendra Raorane", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Hey Hi @sdarda, I have corrected the query. Also attaching sample .sqlite file. Hope this helps to move forward.\r\n\r\nMany Thanks!\r\nNaren", "updateAuthor": { "name": "naren", "key": "naren", "displayName": "Narendra Raorane", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2016-08-03T07:29:52.000+0000", "updated": "2016-08-03T07:29:52.000+0000" }, { "id": "407653", "author": { "name": "fmiao", "key": "fmiao", "displayName": "Feon Sua Xin Miao", "active": true, "timeZone": "America/Vancouver" }, "body": "[~narendra.raorane] the value for {{accessoryType}} should be number not text, from the code snippet you included, it seems you are trying to assign the string \"Ti.UI.LIST_ACCESSORY_TYPE_CHECKMARK\" to accessoryType. ", "updateAuthor": { "name": "fmiao", "key": "fmiao", "displayName": "Feon Sua Xin Miao", "active": true, "timeZone": "America/Vancouver" }, "created": "2017-02-23T06:40:41.000+0000", "updated": "2017-02-23T06:40:41.000+0000" } ], "maxResults": 3, "total": 3, "startAt": 0 } } }