{ "id": "120049", "key": "TIMOB-15278", "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": "15691", "description": "2013 Sprint 19", "name": "2013 Sprint 19", "archived": true, "released": true, "releaseDate": "2013-09-20" }, { "id": "15693", "description": "2013 Sprint 19 API", "name": "2013 Sprint 19 API", "archived": true, "released": true, "releaseDate": "2013-09-20" }, { "id": "15747", "description": "Release 3.1.4", "name": "Release 3.1.4", "archived": true, "released": false }, { "id": "14982", "description": "Release 3.2.0", "name": "Release 3.2.0", "archived": false, "released": true, "releaseDate": "2013-12-19" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2013-09-19T22:05:49.000+0000", "created": "2013-09-17T16:01:15.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "3.1.3", "3.2.0", "ios", "ios7", "listitem", "listsection", "listview", "navigationWindow" ], "versions": [ { "id": "14162", "description": "Release 3.1.0", "name": "Release 3.1.0", "archived": true, "released": true, "releaseDate": "2013-04-16" }, { "id": "15478", "description": "Release 3.1.1", "name": "Release 3.1.1", "archived": true, "released": true, "releaseDate": "2013-06-17" }, { "id": "15479", "description": "Release 3.1.2", "name": "Release 3.1.2", "archived": true, "released": true, "releaseDate": "2013-07-31" }, { "id": "15593", "description": "Release 3.1.3", "name": "Release 3.1.3", "archived": true, "released": true, "releaseDate": "2013-09-18" } ], "issuelinks": [ { "id": "32670", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "inwardIssue": { "id": "121397", "key": "TIMOB-15541", "fields": { "summary": "iOS: ListView - appendSection() will not display items in the ListView when opening a new window for the first time", "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": "Critical", "id": "1" }, "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": "2013-10-18T21:58:55.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": "After setting a ListView with custom template in a navigation window, the listItems are correctly displayed first time. Go back to first window and try to display again the ListView : listItems are not displayed/rendered.\n\nWith a builtin Template there is no problem, listItems are displayed at all times.\n\nSee below for test cases.", "attachment": [], "flagged": false, "summary": "iOS: ListView with custom Template in navigationWindow - listItems not rendered after push/pop", "creator": { "name": "vince", "key": "vince", "displayName": "Vincent ", "active": true, "timeZone": "Europe/Paris" }, "subtasks": [], "reporter": { "name": "vince", "key": "vince", "displayName": "Vincent ", "active": true, "timeZone": "Europe/Paris" }, "environment": "Mac OSX 10.8.4\r\nIOS7 GM\r\nIOS6.1\r\nXCode 5 GM\r\nTI SDK 3.1.3 / 3.2.0", "comment": { "comments": [ { "id": "271490", "author": { "name": "vince", "key": "vince", "displayName": "Vincent ", "active": true, "timeZone": "Europe/Paris" }, "body": "TEST CASE with a custom template:\r\n\r\nclick on 'dataset' to display the listView in the second window.\r\nGo Back\r\nclick again on dataset\r\n\r\nRESULT: no more listItems displayed.\r\n\r\n\r\n\r\n{code}\r\n\r\ndetailTemplate = {\r\n\t\r\n childTemplates: [\r\n \r\n { \r\n type: 'Ti.UI.Label', \r\n bindId: 'theName', \r\n properties: { \r\n \r\n \tcolor:'black',\r\n font:{fontSize:14,fontWeight:'bold'},\r\n\t\t\t\ttop:1,\r\n\t\t\t\tleft:8,\r\n\t\t\t\t\r\n }\r\n },\r\n { \r\n type: 'Ti.UI.Label', \r\n bindId: 'theCategorie', \r\n properties: { \r\n \t \r\n \tcolor:'darkGray',\r\n \tfont:{fontSize:14,fontWeight:'bold'},\r\n\t\t\t\tbottom:1,\r\n\t\t\t\tleft:8,\r\n\t\t\t\t\r\n\t\t\t\t\r\n }\r\n },\r\n \r\n ]\r\n};\r\n\r\n\r\nvar b1 = Ti.UI.createButton({\r\n\ttitle : 'dataset1',\r\n\ttop:20,\r\n});\r\n\r\n\r\nb1.addEventListener('click', function() {\r\n\t\r\n\tvar data1 = [\r\n\r\n \t{ theName: { text: 'Row 1'},theCategorie:{ text: 'Cat 1'} },\r\n \t{ theName: { text: 'Row 2'},theCategorie:{ text: 'Cat 2'} },\r\n \t{ theName: { text: 'Row 3'},theCategorie:{ text: 'Cat 3'} }\r\n \r\n ];\r\n \r\n\tvar listSection1 = Titanium.UI.createListSection({items: data1,headerTitle: 'Data1 Custom Item Template'});\r\n\tlistView.sections=[listSection1];\r\n\trootWin.openWindow(win2);\r\n});\r\n\r\n\r\nvar win1= Ti.UI.createWindow({title:'Custom Item Template'});\r\nwin1.add([b1,]);\r\n\r\n\r\nvar win2 = Ti.UI.createWindow();\r\n\r\nvar listView = Titanium.UI.createListView(\r\n\t\r\n\t\t\t\t\t{templates: { 'detailTemplate':detailTemplate },\r\n\t\t\t\t\tdefaultItemTemplate: 'detailTemplate',\r\n\t\t\t\t}\r\n);\r\n\t\r\n\t\t\r\nlistView.addEventListener('itemclick', function(e){\r\n\t\r\n\t//alert ( JSON.stringify(e));\r\n\tTi.API.info(JSON.stringify(e));\r\n\tvar item = e.section.getItemAt(e.itemIndex);\r\n\tTi.API.info(JSON.stringify(item));\r\n\t\r\n\t\t\r\n});\r\n\r\nwin2.add(listView);\r\n\r\nvar rootWin = Ti.UI.iOS.createNavigationWindow({window:win1});\r\nrootWin.open();\r\n\r\n{code}", "updateAuthor": { "name": "vince", "key": "vince", "displayName": "Vincent ", "active": true, "timeZone": "Europe/Paris" }, "created": "2013-09-17T16:03:56.000+0000", "updated": "2013-09-17T16:07:54.000+0000" }, { "id": "271492", "author": { "name": "vince", "key": "vince", "displayName": "Vincent ", "active": true, "timeZone": "Europe/Paris" }, "body": "TEST CASE with a builtin Template:\r\n\r\nclick on 'dataset' to display the listView in the second window.\r\nGo Back\r\nclick again on dataset\r\n\r\nRESULT: listItems are displayed.\r\n\r\n{code}\r\nvar b1 = Ti.UI.createButton({\r\n\ttitle : 'dataset1',\r\n\ttop:20,\r\n});\r\n\r\n\r\nb1.addEventListener('click', function() {\r\n\t\r\n\tvar data1 = [\r\n\t\r\n \t{ properties : { title: 'Row 1',subtitle: 'Cat 3' }},\r\n \t{ properties : {title: 'Row 2',subtitle: 'Cat 4' }},\r\n \t{ properties : {title: 'Row 3',subtitle:'Cat 5' }}\r\n \r\n ];\r\n \r\n\tvar listSection1 = Titanium.UI.createListSection({items: data1,headerTitle: 'Data1 BUILT-IN TEMPLATE'});\r\n\tlistView.sections=[listSection1];\r\n\trootWin.openWindow(win2);\r\n});\r\n\r\n\r\n\r\nvar win1= Ti.UI.createWindow({title :'Built-in Template'});\r\nwin1.add([b1]);\r\n\r\n\r\nvar win2 = Ti.UI.createWindow();\r\n\r\nvar listView = Titanium.UI.createListView(\r\n\t\r\n\t\t\t\t\t\r\n\t\t\t\t{defaultItemTemplate:Titanium.UI.LIST_ITEM_TEMPLATE_SUBTITLE,}\r\n);\r\n\t\r\n\t\t\r\nlistView.addEventListener('itemclick', function(e){\r\n\t\r\n\t//alert ( JSON.stringify(e));\r\n\tTi.API.info(JSON.stringify(e));\r\n\tvar item = e.section.getItemAt(e.itemIndex);\r\n\tTi.API.info(JSON.stringify(item));\r\n\t\r\n\t\t\r\n});\r\n\r\nwin2.add(listView);\r\nvar rootWin = Ti.UI.iOS.createNavigationWindow({window:win1});\r\n\r\nrootWin.open();\r\n{code}", "updateAuthor": { "name": "vince", "key": "vince", "displayName": "Vincent ", "active": true, "timeZone": "Europe/Paris" }, "created": "2013-09-17T16:06:45.000+0000", "updated": "2013-09-18T16:10:15.000+0000" }, { "id": "271876", "author": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Pull pending against master\r\nhttps://github.com/appcelerator/titanium_mobile/pull/4715", "updateAuthor": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2013-09-18T23:14:51.000+0000", "updated": "2013-09-18T23:14:51.000+0000" }, { "id": "271878", "author": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "body": "For now use this workaround on older titanium releases.\n{code}\nb1.addEventListener('click', function() {\n \n var data1 = [\n \n { theName: { text: 'Row 1'},theCategorie:{ text: 'Cat 1'} },\n { theName: { text: 'Row 2'},theCategorie:{ text: 'Cat 2'} },\n { theName: { text: 'Row 3'},theCategorie:{ text: 'Cat 3'} }\n \n ];\n \n var listSection1 = Titanium.UI.createListSection({items: data1,headerTitle: 'Data1 Custom Item Template'});\n listView.sections=[listSection1];\n //BLOCKER BUG TIMOB-15278. THIS IS A WORKAROUND. SET THE TEMPLATES AGAIN\n listView.templates = {'detailTemplate':detailTemplate};\n rootWin.openWindow(win2);\n});\n{code}", "updateAuthor": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2013-09-18T23:18:01.000+0000", "updated": "2013-09-18T23:18:01.000+0000" }, { "id": "272121", "author": { "name": "vince", "key": "vince", "displayName": "Vincent ", "active": true, "timeZone": "Europe/Paris" }, "body": "tested with 3.2.0.v20130919154842 and there is another problem if you use listView.appendSection() right now:\r\n\r\n\r\nTEST CASE:\r\n\r\nrun the following code on 3.2.0.v20130919154842, click on 'dataset': the first time, dataItems are not displayed, second time all is OK.\r\n\r\nthe only change is line 52\r\n\r\n{code}\r\ndetailTemplate = {\r\n\t\r\n childTemplates: [\r\n \r\n { \r\n type: 'Ti.UI.Label', \r\n bindId: 'theName', \r\n properties: { \r\n \r\n \tcolor:'black',\r\n font:{fontSize:14,fontWeight:'bold'},\r\n\t\t\t\ttop:1,\r\n\t\t\t\tleft:8,\r\n\t\t\t\t\r\n }\r\n },\r\n { \r\n type: 'Ti.UI.Label', \r\n bindId: 'theCategorie', \r\n properties: { \r\n \t \r\n \tcolor:'darkGray',\r\n \tfont:{fontSize:14,fontWeight:'bold'},\r\n\t\t\t\tbottom:1,\r\n\t\t\t\tleft:8,\r\n\t\t\t\t\t\t\t\t\r\n }\r\n },\r\n \r\n ]\r\n};\r\n\r\n\r\nvar b1 = Ti.UI.createButton({\r\n\ttitle : 'dataset1',\r\n\ttop:20,\r\n});\r\n\r\n\r\nb1.addEventListener('click', function() {\r\n\t\r\n\tvar data1 = [\r\n\r\n \t{ theName: { text: 'Row 1'},theCategorie:{ text: 'Cat 1'} },\r\n \t{ theName: { text: 'Row 2'},theCategorie:{ text: 'Cat 2'} },\r\n \t{ theName: { text: 'Row 3'},theCategorie:{ text: 'Cat 3'} }\r\n \r\n ];\r\n \r\n \r\n\tvar listSection1 = Titanium.UI.createListSection({items: data1,headerTitle: 'Data1 Custom Item Template'});\r\n\tlistView.appendSection(listSection1);\r\n\t\r\n\t rootWin.openWindow(win2);\r\n});\r\n\r\n\r\nvar win1= Ti.UI.createWindow({title:'Custom Item Template'});\r\nwin1.add([b1,]);\r\n\r\n\r\nvar win2 = Ti.UI.createWindow();\r\n\r\nvar listView = Titanium.UI.createListView(\r\n\t\r\n\t\t\t\t\t{templates: { 'detailTemplate':detailTemplate },\r\n\t\t\t\t\tdefaultItemTemplate: 'detailTemplate',\r\n\t\t\t\t}\r\n);\r\n\t\r\n\t\t\r\nlistView.addEventListener('itemclick', function(e){\r\n\t\r\n\t//alert ( JSON.stringify(e));\r\n\tTi.API.info(JSON.stringify(e));\r\n\tvar item = e.section.getItemAt(e.itemIndex);\r\n\tTi.API.info(JSON.stringify(item));\r\n\t\r\n\t\t\r\n});\r\n\r\nwin2.add(listView);\r\n\r\nvar rootWin = Ti.UI.iOS.createNavigationWindow({window:win1});\r\nrootWin.open();\r\n\r\n\r\n\r\n{code}\r\n\r\n\r\n\r\n\r\n", "updateAuthor": { "name": "vince", "key": "vince", "displayName": "Vincent ", "active": true, "timeZone": "Europe/Paris" }, "created": "2013-09-20T15:51:01.000+0000", "updated": "2013-09-20T15:51:42.000+0000" }, { "id": "272209", "author": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Backport to 3_1_X\nhttps://github.com/appcelerator/titanium_mobile/pull/4722", "updateAuthor": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2013-09-20T20:43:03.000+0000", "updated": "2013-09-20T20:43:03.000+0000" }, { "id": "275739", "author": { "name": "wluu", "key": "wluu", "displayName": "Wilson Luu", "active": false, "timeZone": "America/Los_Angeles" }, "updateAuthor": { "name": "wluu", "key": "wluu", "displayName": "Wilson Luu", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2013-10-18T21:33:21.000+0000", "updated": "2013-10-18T21:33:41.000+0000" } ], "maxResults": 7, "total": 7, "startAt": 0 } } }