{ "id": "63544", "key": "TIMOB-2912", "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": "13271", "description": "Release 2.1.0", "name": "Release 2.1.0", "archived": false, "released": true, "releaseDate": "2012-06-29" }, { "id": "13408", "description": "Sprint 2012-12 API", "name": "Sprint 2012-12 API", "archived": true, "released": true, "releaseDate": "2012-06-17" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2012-07-04T23:13:14.000+0000", "created": "2011-04-15T03:32:44.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "api", "module_tableviewrow", "qe-testadded", "regression" ], "versions": [ { "id": "13272", "description": "Release 2.0.1", "name": "Release 2.0.1", "archived": true, "released": true, "releaseDate": "2012-04-16" } ], "issuelinks": [ { "id": "17660", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "inwardIssue": { "id": "92848", "key": "TIMOB-9400", "fields": { "summary": "iOS: Children are not removed from parents view hierarchy when context is shutdown", "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 } } } }, { "id": "21922", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "inwardIssue": { "id": "103146", "key": "TIMOB-11390", "fields": { "summary": "Android: TableViewRow - Missing tableViewRow data", "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": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "updated": "2012-10-11T18:39:27.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": "10206", "name": "iOS", "description": "iOS Platform" } ], "description": "{html}

Hi,
\r\nI have this problem on iphone simulator and latest development\r\nenvironment.
\r\nI have a window with a tableview (with custom tableViewRows) and a\r\nclose button in the bottom.
\r\nWhen I first open the window everything shows up, but when I close\r\nthe window and then open it again the content of the tableView\r\ndisappear. I have the tableview with the lines row separators but\r\nwith nothing is showing in the tableviewrows.
\r\nhere is how I build the app.js you can test:

\r\n
\r\nTitanium.UI.setBackgroundColor('#333');\r\n\r\nvar page2 = Titanium.UI.createWindow({  \r\n    title:'page2',\r\n    backgroundColor:'#fff'\r\n});\r\n\r\nvar data = [];\r\n\r\nvar listTable = Titanium.UI.createTableView({});\r\n\r\nfor(var indice=0; indice<15; indice++) {\r\n\r\n    var row = Titanium.UI.createTableViewRow();\r\n\r\n    var img = Titanium.UI.createImageView({\r\n            image:'KS_nav_ui.png',\r\n            width:50,\r\n            height:50,\r\n            left:0,\r\n            top:0\r\n    });\r\n\r\n    var label = Titanium.UI.createLabel({\r\n        text:indice,\r\n        font:{fontSize:14},\r\n        textAlign:'center',\r\n        borderColor:'black'\r\n    });\r\n\r\n    row.add(img);\r\n    row.add(label);\r\n    \r\n    row.hasChild=false;\r\n    row.height = 50;\r\n    row.className = 'list';\r\n                \r\n    data.push(row);\r\n}\r\n\r\nlistTable.bottom = 50;\r\n\r\nlistTable.setData(data);\r\n        \r\npage2.add(listTable);\r\n\r\nvar b2 = Titanium.UI.createButton({\r\n    title:'CLOSE',\r\n    bottom:5,\r\n    height:40\r\n});\r\n\r\npage2.add(b2);\r\n\r\nb2.addEventListener('click',function()\r\n{\r\n    page2.close();\r\n});\r\n\r\nvar win = Titanium.UI.createWindow({  \r\n    title:'win',\r\n    backgroundColor:'#555'\r\n});\r\n\r\nvar button = Titanium.UI.createButton({\r\n    title:'OPEN'\r\n});\r\n\r\nbutton.addEventListener('click',function()\r\n        {\r\n            page2.open();\r\n        });\r\n        \r\nwin.add(button);\r\n\r\nwin.open();\r\n
{html}", "attachment": [ { "id": "18242", "filename": "app.js", "author": { "name": "enricoluciano", "key": "enricoluciano", "displayName": "Enrico Luciano", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T03:32:44.000+0000", "size": 1308, "mimeType": "application/x-javascript" } ], "flagged": false, "summary": "iOS: TableViewRow content disappear after window close and open", "creator": { "name": "enricoluciano", "key": "enricoluciano", "displayName": "Enrico Luciano", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "enricoluciano", "key": "enricoluciano", "displayName": "Enrico Luciano", "active": true, "timeZone": "America/Los_Angeles" }, "environment": null, "comment": { "comments": [ { "id": "196362", "author": { "name": "hdogan", "key": "hdogan", "displayName": "Hidayet Dogan", "active": true, "timeZone": "Europe/Istanbul" }, "body": "I have got a same *critical* problem. I got just basic VIEW with vertical layout and Ti.UI.SIZE given as a height and 2 labels on that VIEW. When I click on row and open new window and return back, row content (VIEW) sometimes disappear but the row(s) presences it's height and SECTION titles.\r\n\r\nI've noticed that row content disappears when I just click on the row and row is highlighted with selected color effect and before the new window opened.\r\n\r\nTested with 2.0.1GA2 and 2.1.0 (build from git 05/25/2012).\r\n\r\nIMHO, priority must be High. I'll try to record a video and submit it.", "updateAuthor": { "name": "hdogan", "key": "hdogan", "displayName": "Hidayet Dogan", "active": true, "timeZone": "Europe/Istanbul" }, "created": "2012-05-29T15:01:10.000+0000", "updated": "2012-05-29T15:01:10.000+0000" }, { "id": "196363", "author": { "name": "hdogan", "key": "hdogan", "displayName": "Hidayet Dogan", "active": true, "timeZone": "Europe/Istanbul" }, "body": "By the way, the problem started with 2.0.1, it was working well with 1.8.x.", "updateAuthor": { "name": "hdogan", "key": "hdogan", "displayName": "Hidayet Dogan", "active": true, "timeZone": "Europe/Istanbul" }, "created": "2012-05-29T15:02:40.000+0000", "updated": "2012-05-29T15:02:40.000+0000" }, { "id": "196368", "author": { "name": "hdogan", "key": "hdogan", "displayName": "Hidayet Dogan", "active": true, "timeZone": "Europe/Istanbul" }, "body": "Here is the video of the bugged application. It's tested with 2.1.0.\r\n\r\n[http://tinypic.com/player.php?v=288rvr6&s=6]\r\n\r\nI've also noticed that section titles disappear when scrolling table and when section become top shown one.", "updateAuthor": { "name": "hdogan", "key": "hdogan", "displayName": "Hidayet Dogan", "active": true, "timeZone": "Europe/Istanbul" }, "created": "2012-05-29T15:41:53.000+0000", "updated": "2012-05-29T15:44:11.000+0000" }, { "id": "196680", "author": { "name": "hdogan", "key": "hdogan", "displayName": "Hidayet Dogan", "active": true, "timeZone": "Europe/Istanbul" }, "body": "Here are the test project for the issue (tested with 2.0.1GA2):\r\n\r\nHow to test: Click the button and open window with table, click on random row and open detail window, go back, click again, go back, go back (to main window) click and open window with table again, click on random row, go back.... and going like this.\r\n\r\nIt's not always happen but it randomly disappears row content (container view or labels, I could't determine).\r\n\r\nI've tried with almost every combination of layout/height/width/top/left/right/bottom properties with container view and labels.\r\n\r\n\r\nFILE: app.js\r\n\r\n\r\n{code}\r\nTi.UI.setBackgroundColor('#fff');\r\n\r\nvar tabGroup = Ti.UI.createTabGroup();\r\n\r\nvar winMain = Ti.UI.createWindow({\r\n\turl: 'main.js',\r\n\ttitle: 'Main Window'\r\n});\r\n\r\nvar tab1 = Ti.UI.createTab({\r\n\twindow: winMain,\r\n\ttitle: 'Main Window'\r\n})\r\n\r\ntabGroup.addTab(tab1);\r\ntabGroup.open();\r\n{code}\r\n\r\n\r\nFILE: main.js\r\n\r\n\r\n{code}\r\nvar winTable = Ti.UI.createWindow({\r\n\turl: 'table.js',\r\n\ttitle: 'Table Window'\r\n});\r\n\r\nvar button = Ti.UI.createButton({\r\n\ttitle: 'Open Window with Table'\r\n});\r\n\r\nbutton.addEventListener('click', function(e) {\r\n\tTi.UI.currentTab.open(winTable, {animated: true});\r\n});\r\n\r\nTi.UI.currentWindow.add(button);\r\n{code}\r\n\r\n\r\nFILE: table.js\r\n\r\n\r\n{code}\r\nvar winDetail = Ti.UI.createWindow({\r\n\turl: 'detail.js',\r\n\ttitle: 'Detail Window'\r\n});\r\n\r\nvar table = Ti.UI.createTableView();\r\n\r\ntable.addEventListener('click', function(e) {\r\n\twinDetail.sectionIndex = e.rowData.sectionIndex;\r\n\twinDetail.rowIndex = e.rowData.rowIndex;\r\n\tTi.UI.currentTab.open(winDetail, {animated: true});\r\n});\r\n\r\nTi.UI.currentWindow.add(table);\r\n\r\nvar data = [];\r\n\r\nfor (var i = 0; i < 5; i++) {\r\n\tdata[i] = Ti.UI.createTableViewSection({\r\n\t\theaderTitle: 'Section ' + i\r\n\t});\r\n\t\r\n\tfor (var j = 0; j < 5; j++) {\r\n\t\tvar row = Ti.UI.createTableViewRow({\r\n\t\t\tclassName: 'row',\r\n\t\t\thasDetail: true,\r\n\t\t\tsectionIndex: i,\r\n\t\t\trowIndex: j\r\n\t\t});\r\n\t\t\r\n\t\tvar container = Ti.UI.createView({\r\n\t\t\tlayout: 'vertical',\r\n\t\t\theight: Ti.UI.SIZE,\r\n\t\t\ttop: 10,\r\n\t\t\tleft: 10,\r\n\t\t\tbottom: 10,\r\n\t\t\tright: 10\r\n\t\t});\r\n\t\t\r\n\t\tcontainer.add(Ti.UI.createLabel({\r\n\t\t\tleft: 0,\r\n\t\t\ttext: 'Label ' + j,\r\n\t\t\tfont: {\r\n\t\t\t\tfontWeight: 'bold',\r\n\t\t\t\tfontSize: 16\r\n\t\t\t}\r\n\t\t}));\r\n\t\t\r\n\t\tcontainer.add(Ti.UI.createLabel({\r\n\t\t\ttop: 5,\r\n\t\t\tleft: 0,\r\n\t\t\ttext: 'Sub Label ' + j,\r\n\t\t\tfont: {\r\n\t\t\t\tfontStyle: 'italic',\r\n\t\t\t\tfontSize: 14\r\n\t\t\t}\r\n\t\t}));\r\n\t\t\r\n\t\trow.add(container);\r\n\t\tdata[i].add(row);\r\n\t}\r\n\t\r\n\ttable.setData(data);\r\n}\r\n{code}\r\n\r\n\r\nFILE: detail.js\r\n\r\n\r\n{code}\r\nvar label = Ti.UI.createLabel({\r\n\ttext: 'Section: ' + Ti.UI.currentWindow.sectionIndex + ' Row: ' + Ti.UI.currentWindow.rowIndex\r\n});\r\n\r\nTi.UI.currentWindow.add(label);\r\n{code}\r\n", "updateAuthor": { "name": "hdogan", "key": "hdogan", "displayName": "Hidayet Dogan", "active": true, "timeZone": "Europe/Istanbul" }, "created": "2012-05-31T03:00:15.000+0000", "updated": "2012-05-31T03:01:26.000+0000" }, { "id": "196942", "author": { "name": "hdogan", "key": "hdogan", "displayName": "Hidayet Dogan", "active": true, "timeZone": "Europe/Istanbul" }, "body": "I've also noticed another bug which is probably related to this one.\r\n\r\nWebView on Window is also disappears completely after you open, close and open the window again. Main window is opened by TabGroup. And the window contains WebView does NOT use \"url\" property. It's created and added in same JS file with TabGroup (main Window). If I split window source code containing WebView to another JS file and using \"url\" property, it does NOT happen. I've tested it with latest Git build (2.1.0 2012-06-02)\r\n\r\nShall I open another ticket for this additional issue?\r\n", "updateAuthor": { "name": "hdogan", "key": "hdogan", "displayName": "Hidayet Dogan", "active": true, "timeZone": "Europe/Istanbul" }, "created": "2012-06-03T03:45:09.000+0000", "updated": "2012-06-03T03:45:09.000+0000" }, { "id": "196944", "author": { "name": "ngupta", "key": "ngupta", "displayName": "Neeraj Gupta", "active": true, "timeZone": "America/Los_Angeles" }, "body": "@Hidayet - Yes, please.", "updateAuthor": { "name": "ngupta", "key": "ngupta", "displayName": "Neeraj Gupta", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-06-03T09:59:41.000+0000", "updated": "2012-06-03T09:59:41.000+0000" }, { "id": "196964", "author": { "name": "hdogan", "key": "hdogan", "displayName": "Hidayet Dogan", "active": true, "timeZone": "Europe/Istanbul" }, "updateAuthor": { "name": "hdogan", "key": "hdogan", "displayName": "Hidayet Dogan", "active": true, "timeZone": "Europe/Istanbul" }, "created": "2012-06-04T02:14:46.000+0000", "updated": "2012-06-04T02:14:46.000+0000" }, { "id": "197386", "author": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Could not reproduce the issue in the attached app.js but was easily able to reproduce the second issue. Basically a context shutdown issue.\r\nWhen the winTable closes, it destroys the TableView object but does not destroy the winTable object (Created in a different context. As such the tableView still exists in the windows children array.\r\n\r\nSo when you open the winTable window again a second tableView gets added to the children array on execution of table.js\r\n\r\nThe Javascript workaround is simple enough.\r\nAdd the following code \r\n\r\nFile: table.js\r\n{code}\r\nTi.UI.currentWindow.addEventListener('close',function(e){\r\n\tTi.UI.currentWindow.remove(table);\r\n})\r\n{code}\r\n\r\nFile: detail.js\r\n{code}\r\nTi.UI.currentWindow.addEventListener('close',function(e){\r\n\tTi.UI.currentWindow.remove(label);\r\n})\r\n{code}\r\n\r\nA separate ticket (TIMOB-9400) has been filed to address this issue.", "updateAuthor": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2012-06-05T14:23:46.000+0000", "updated": "2012-06-05T14:23:46.000+0000" }, { "id": "197388", "author": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Providing a JS workaround. Issue to fix the problem in the platform will be handled post 2.1.0", "updateAuthor": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2012-06-05T14:25:25.000+0000", "updated": "2012-06-05T14:25:25.000+0000" }, { "id": "198554", "author": { "name": "emerriman", "key": "emerriman", "displayName": "Eric Merriman ", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Note to QE- Use the first example code as the second set is covered in TIMOB-9400.", "updateAuthor": { "name": "emerriman", "key": "emerriman", "displayName": "Eric Merriman ", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-06-14T14:19:26.000+0000", "updated": "2012-06-14T14:19:26.000+0000" }, { "id": "198555", "author": { "name": "emerriman", "key": "emerriman", "displayName": "Eric Merriman ", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Verified fixed with SDK 2.1.0.v20120614124151 and iPhone 4 (5.0.1)", "updateAuthor": { "name": "emerriman", "key": "emerriman", "displayName": "Eric Merriman ", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-06-14T14:20:34.000+0000", "updated": "2012-06-14T14:20:34.000+0000" }, { "id": "201524", "author": { "name": "amittal", "key": "amittal", "displayName": "Anshu Mittal", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Reopening to update labels.", "updateAuthor": { "name": "amittal", "key": "amittal", "displayName": "Anshu Mittal", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-07-04T23:11:23.000+0000", "updated": "2012-07-04T23:11:23.000+0000" } ], "maxResults": 12, "total": 12, "startAt": 0 } } }