{ "id": "90604", "key": "TIMOB-8802", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "10153", "key": "TIMOB", "name": "Titanium SDK/CLI", "projectCategory": { "id": "10100", "description": "Titanium and related SDKs used in application development", "name": "Client" } }, "fixVersions": [ { "id": "14127", "description": "Sprint 2012-19 API", "name": "Sprint 2012-19 API", "archived": true, "released": true, "releaseDate": "2012-09-24" }, { "id": "14271", "description": "2012 Sprint 19", "name": "2012 Sprint 19", "archived": true, "released": true, "releaseDate": "2012-09-24" } ], "resolution": { "id": "2", "description": "The problem described is an issue which will never be fixed.", "name": "Won't Fix" }, "resolutiondate": "2012-09-18T17:41:01.000+0000", "created": "2012-04-19T16:23:36.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "SupportTeam", "api", "parity", "regression" ], "versions": [ { "id": "13271", "description": "Release 2.1.0", "name": "Release 2.1.0", "archived": false, "released": true, "releaseDate": "2012-06-29" } ], "issuelinks": [ { "id": "16736", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "outwardIssue": { "id": "86910", "key": "TIMOB-7796", "fields": { "summary": "Android: Accessing row and rowData properties has different results for TableView ", "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": "High", "id": "2" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } } ], "assignee": { "name": "hpham", "key": "hpham", "displayName": "Hieu Pham", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2013-03-13T15:06:07.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": "10202", "name": "Android", "description": "Android Platform" } ], "description": "Test case:\r\n{code}\r\n\r\nvar win = Ti.UI.createWindow({\r\n backgroundColor:'white'\r\n});\r\n \r\nwin.open();\r\n \r\n// CASE 1\r\n \r\nvar data = [\r\n {title:'Row 1', hasChild:true, color:'red', selectedColor:'#fff', special:'special 1'},\r\n {title:'Row 2', hasDetail:true, color:'green', selectedColor:'#fff', special:'special 2'},\r\n];\r\n \r\n// create table view\r\nvar tableview = Titanium.UI.createTableView({\r\n top: 20,\r\n height: 200,\r\n data:data,\r\n borderColor: 'orange',\r\n borderWidth:'5',\r\n separatorColor:'black',\r\n headerTitle:'Table 1 without using createTableViewRow'\r\n});\r\n \r\nwin.add(tableview);\r\n \r\n// create table view event listener\r\ntableview.addEventListener('click', function(e)\r\n{\r\n showClickEventInfo(e);\r\n});\r\n \r\nfunction showClickEventInfo(e) {\r\n var row = e.row;\r\n var rowdata = e.rowData;\r\n alert('Row Special: ' + row.special);\r\n alert('Row Data Special: ' + rowdata.special);\r\n}\r\n \r\n \r\n// CASE 2\r\n \r\nvar data1 = [];\r\n \r\ndata1[0] = Ti.UI.createTableViewRow({hasChild:true,title:'Row 1', special:'special 1'});\r\ndata1[1] = Ti.UI.createTableViewRow({hasDetail:true,title:'Row 2', special:'special 2'});\r\n \r\n \r\n// create table view\r\nvar tableview1 = Titanium.UI.createTableView({\r\n top: 240,\r\n borderColor: 'orange',\r\n borderWidth:'5',\r\n height: 200,\r\n separatorColor:'black',\r\n data:data1,\r\n headerTitle:'Table 2 using createTableViewRow'\r\n});\r\n \r\nwin.add(tableview1);\r\n \r\nfunction showClickEventInfo1(e) {\r\n var row = e.row;\r\n var rowdata = e.rowData; \r\n alert('Row Special: ' + row.special);\r\n alert('Row Data Special: ' + rowdata.special);\r\n}\r\n \r\n \r\n// create table view event listener\r\ntableview1.addEventListener('click', function(e)\r\n{\r\n showClickEventInfo1(e);\r\n});\r\n{code}\r\n\r\n\r\nIn the first tableview, rows are created implicitly using JS Object and the second tableview creates rows explicitly using createTableViewRow method. The above code gives the same result for both tableview in iOS.", "attachment": [], "flagged": false, "summary": "Android: Accessing row and rowData properties (non-propertyAccessors) has different results for TableView", "creator": { "name": "pwang", "key": "pwang", "displayName": "Ping Wang", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "pwang", "key": "pwang", "displayName": "Ping Wang", "active": true, "timeZone": "America/Los_Angeles" }, "environment": null, "comment": { "comments": [ { "id": "201323", "author": { "name": "tinjaw", "key": "tinjaw", "displayName": "Chaim Krause", "active": true, "timeZone": "America/Chicago" }, "body": "I have code that worked in 2.0.2GA SDK, that is now broke in 2.1.0 SDK.\r\n\r\nI have a click event listener on a TableView and rowData is undefinded in the event callback.", "updateAuthor": { "name": "tinjaw", "key": "tinjaw", "displayName": "Chaim Krause", "active": true, "timeZone": "America/Chicago" }, "created": "2012-07-03T05:56:15.000+0000", "updated": "2012-07-03T05:56:15.000+0000" }, { "id": "218722", "author": { "name": "hpham", "key": "hpham", "displayName": "Hieu Pham", "active": true, "timeZone": "America/Los_Angeles" }, "body": "If you're creating rows implicitly using JS objects, any custom properties set upon creation can only be accessed via \"rowData\" property (i.e e.rowData.special). \r\n\r\nIf you're creating rows explicitly - using Ti.UI.createTableViewRow(), any custom properties set upon creation can be accessed via the row object and \"rowData\" property.\r\n\r\nThis is a platform limitation. We don't recommend creating rows implicitly.\r\n\r\nDocumentation will be updated to prevent future confusion.\r\n\r\n\r\n@Chaim\r\n\r\nWhat you describe seem to be a different issue. If it's still happening, please file a separate JIRA.", "updateAuthor": { "name": "hpham", "key": "hpham", "displayName": "Hieu Pham", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-09-12T14:51:20.000+0000", "updated": "2012-09-12T14:51:20.000+0000" }, { "id": "219628", "author": { "name": "aevans", "key": "aevans", "displayName": "Arthur Evans", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Documentation added for this case.", "updateAuthor": { "name": "aevans", "key": "aevans", "displayName": "Arthur Evans", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-09-18T17:41:02.000+0000", "updated": "2012-09-18T17:41:02.000+0000" }, { "id": "229722", "author": { "name": "nhuynh", "key": "nhuynh", "displayName": "Natalie Huynh", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Closing as won't fix and documented", "updateAuthor": { "name": "nhuynh", "key": "nhuynh", "displayName": "Natalie Huynh", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-12-04T00:08:44.000+0000", "updated": "2012-12-04T00:08:44.000+0000" } ], "maxResults": 6, "total": 6, "startAt": 0 } } }