{ "id": "124599", "key": "TIMOB-16157", "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": "15817", "description": "2014 Sprint 01", "name": "2014 Sprint 01", "archived": true, "released": true, "releaseDate": "2014-01-17" }, { "id": "15820", "description": "2014 Sprint 01 API", "name": "2014 Sprint 01 API", "archived": true, "released": true, "releaseDate": "2014-01-17" }, { "id": "15856", "description": "Release 3.2.1", "name": "Release 3.2.1", "archived": false, "released": true, "releaseDate": "2014-02-10" }, { "id": "15422", "description": "Release 3.3.0", "name": "Release 3.3.0", "archived": false, "released": true, "releaseDate": "2014-07-16" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2014-09-12T13:56:59.000+0000", "created": "2014-01-09T15:02:57.000+0000", "priority": null, "labels": [ "ios7", "listview", "module_listview", "qe-manualtest", "sdk3.2" ], "versions": [], "issuelinks": [], "assignee": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "updated": "2014-09-12T13:56:59.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" } ], "attachment": [], "flagged": false, "summary": "ListView Phase 2 - Templates and Search not working together", "creator": { "name": "hardbyte", "key": "hardbyte", "displayName": "Craig Jones", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "hardbyte", "key": "hardbyte", "displayName": "Craig Jones", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "Titanium Studio, build: 3.2.0.201312191547\r\nSDK 3.2.0.GA\r\niOS 7.0.4", "comment": { "comments": [ { "id": "287401", "author": { "name": "dhaligas", "key": "dhaligas", "displayName": "Darren Haligas", "active": true, "timeZone": "America/Chicago" }, "body": "I can confirm this behavior. \n\nMy workaround was to put the search bar outside of the list view and use the searchText property when the onChange event is fired on the searchBar. ", "updateAuthor": { "name": "dhaligas", "key": "dhaligas", "displayName": "Darren Haligas", "active": true, "timeZone": "America/Chicago" }, "created": "2014-01-09T15:11:35.000+0000", "updated": "2014-01-09T15:11:35.000+0000" }, { "id": "287404", "author": { "name": "hardbyte", "key": "hardbyte", "displayName": "Craig Jones", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Hi Darren,\n\nThanks so much for your work around, tried and tested and works a treat. \nAltered code below allows a neater ListView now to be implemented on my apps - thank you!\n\nHowever (inc AppC guys) - I'm thinking this is just a work around as I can't use searchHidden: false now?\n\n{code}\nvar self = Ti.UI.createWindow({\n backgroundColor: common.layout.backgroundColor,\n title: \"Search\",\n navBarHidden: false,\n layout: 'vertical'\n});\n\n//Create search bar\nvar listSearch = Titanium.UI.createSearchBar({\n barColor:'#C7C7C7',\n height: 43,\n top: 0\n});\nself.add(listSearch);\n//Function to catch click event from Template\nfunction clickEvent (e) {\n alert(JSON.stringify(e)); \n}//\n\n//Template with 2 labels\nvar plainTemplate = {\n childTemplates: [\n { // Title\n type: 'Ti.UI.Label', // Use a label for the title\n bindId: 'title', // Maps to a custom title property of the item data\n properties: { // Sets the label properties\n color: '#000',\n font: { fontFamily:'Arial', fontSize: '20dp', fontWeight:'bold' },\n left: '60dp', top: 0,\n },\n },\n { // Subtitle\n type: 'Ti.UI.Label', // Use a label for the subtitle\n bindId: 'subtitle', // Maps to a custom subtitle property of the item data\n properties: { // Sets the label properties\n color: '#000',\n font: { fontFamily:'Arial', fontSize: '14dp' },\n left: '60dp', top: '25dp',\n }\n }\n ],\n // Binds a callback to the click event, which catches events bubbled by the view subcomponents.\n events: {click: clickEvent },\n properties :{\n accessoryType: Ti.UI.LIST_ACCESSORY_TYPE_NONE\n }\n};\n\n\n//Create ListView\nvar listView = Ti.UI.createListView({\n templates: { 'template': plainTemplate },\n defaultItemTemplate: 'template',\n searchHidden: false //does not work with this bodge\n}); \n\n\nvar sections = []; //array\n\n//Fruit section\nvar fruitSection = Ti.UI.createListSection({ headerTitle: 'Fruits'});\nvar fruitDataSet = [\n { title: {text: 'Apple' }, subtitle: { text: 'Sub sub label' }, searchableText: 'Apple', properties: {title: 'Apple', subtitle: 'Sub sub label', searchableText: 'Apple', itemId: 1, accessoryType: Ti.UI.LIST_ACCESSORY_TYPE_DISCLOSURE, canEdit: true}},\n { title: {text: 'Banana' }, subtitle: { text: 'Sub sub label' }, searchableText: 'Banana', properties: { itemId: 2, title: 'Banana', subtitle: 'Sub sub label', searchableText: 'Banana', accessoryType: Ti.UI.LIST_ACCESSORY_TYPE_DISCLOSURE, canEdit: true}},\n {properties: { title: 'Pear', subtitle: 'Sub sub label', searchableText: 'Pear', canEdit: true}},\n {properties: { title: 'Orange', subtitle: 'Sub sub label', searchableText: 'Orange', canEdit: true}}\n];\nfruitSection.setItems(fruitDataSet);\nsections.push(fruitSection);\n\n//Veg section\nvar vegSection = Ti.UI.createListSection({ headerTitle: 'Vegetables'});\nvar vegDataSet = [\n {properties: { title: 'Carrots', subtitle: 'Sub sub label', searchableText: 'Carrots', editing: true}},\n {properties: { title: 'Potatoes', subtitle: 'Sub sub label', searchableText: 'Potatoes', editing: true}},\n];\nvegSection.setItems(vegDataSet);\nsections.push(vegSection);\n\nlistView.sections = sections; //assign sections\n\nvar indices = [{index:0, title: 'F'},\n {index:1, title: 'V'},\n {index:2, title: 'F'}\n ];\nlistView.sectionIndexTitles = indices; //assign indexing\n \nself.add(listView); //add to self\n\n//Example of appending Fish section\nvar fishSection = Ti.UI.createListSection({ headerTitle: 'Fish'});\nvar fishDataSet = [\n {properties: { title: 'Cod', subtitle: 'Sub sub label', searchableText: 'Cod'}},\n {properties: { title: 'Haddock', subtitle: 'Sub sub label', searchableText: 'Haddock'}},\n];\nfishSection.setItems(fishDataSet);\nlistView.appendSection(fishSection);\n\n\nlistSearch.addEventListener('change', function(e){\n listView.searchText = e.value;\n Ti.API.info('e.value: ' + e.value);\n Ti.API.info('listview: ' + listView.searchText); \n});\n\n\nreturn self;\n{code}\n\n", "updateAuthor": { "name": "hardbyte", "key": "hardbyte", "displayName": "Craig Jones", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-01-09T15:42:53.000+0000", "updated": "2014-01-09T15:42:53.000+0000" }, { "id": "287486", "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/5199\r\nBackport to 3_2_X\r\nhttps://github.com/appcelerator/titanium_mobile/pull/5200", "updateAuthor": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2014-01-09T19:42:44.000+0000", "updated": "2014-01-09T19:42:44.000+0000" }, { "id": "288053", "author": { "name": "wluu", "key": "wluu", "displayName": "Wilson Luu", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Closing ticket as fixed. Verified using the modified sample app (see below) that I was able to search for items on the list.\n\n*Tested on:*\n\nAppcelerator Studio, build: 3.2.1.201401091743\nSDK build: 3.2.1.v20140110140111, 3.3.0.v20140110133250\nCLI: 3.2.1-beta\nAlloy: 1.3.1-beta2\nXcode: 5.0.2\nDevices: iphone 5 (6.1.3), iphone 5s (7.0.2), iphone 4s (7.0.4)\n\n*Note to QE*: Here is the modified sample app that I used to verify the ticket:\n{code:javascript}\nvar win = Ti.UI.createWindow({\n backgroundColor: 'white',\n title: \"Search\",\n navBarHidden: false,\n layout: 'vertical'\n});\n \n//Create search bar\nvar listSearch = Titanium.UI.createSearchBar({\n barColor:'#C7C7C7',\n height: 43,\n top: 0\n});\n \n//Function to catch click event from Template\nfunction clickEvent (e) {\n alert(JSON.stringify(e)); \n}//\n \n//Template with 2 labels\nvar plainTemplate = {\n childTemplates: [\n { // Title\n type: 'Ti.UI.Label', // Use a label for the title\n bindId: 'title', // Maps to a custom title property of the item data\n properties: { // Sets the label properties\n color: '#000',\n font: { fontFamily:'Arial', fontSize: '20dp', fontWeight:'bold' },\n left: '60dp', top: 0,\n },\n },\n { // Subtitle\n type: 'Ti.UI.Label', // Use a label for the subtitle\n bindId: 'subtitle', // Maps to a custom subtitle property of the item data\n properties: { // Sets the label properties\n color: '#000',\n font: { fontFamily:'Arial', fontSize: '14dp' },\n left: '60dp', top: '25dp',\n }\n }\n ],\n // Binds a callback to the click event, which catches events bubbled by the view subcomponents.\n events: {click: clickEvent },\n properties :{\n accessoryType: Ti.UI.LIST_ACCESSORY_TYPE_NONE\n }\n};\n \n \n//Create ListView\nvar listView = Ti.UI.createListView({\n templates: { 'template': plainTemplate }, //with template theres no search bar\n defaultItemTemplate: 'template', //comment out template and search bar works \n searchView: listSearch,\n caseInsensitiveSearch: true,\n searchHidden: false\n}); \n \n \nvar sections = []; //array\n \n//Fruit section\nvar fruitSection = Ti.UI.createListSection({ headerTitle: 'Fruits'});\nvar fruitDataSet = [\n { title: {text: 'Apple' }, subtitle: { text: 'Sub sub label' }, searchableText: 'Apple', properties: {title: 'Apple', subtitle: 'Sub sub label', searchableText: 'Apple', itemId: 1, accessoryType: Ti.UI.LIST_ACCESSORY_TYPE_DISCLOSURE}},\n { title: {text: 'Banana' }, subtitle: { text: 'Sub sub label' }, searchableText: 'Banana', properties: { itemId: 2, title: 'Banana', subtitle: 'Sub sub label', searchableText: 'Banana', accessoryType: Ti.UI.LIST_ACCESSORY_TYPE_DISCLOSURE }},\n {properties: { title: 'Pear', subtitle: 'Sub sub label', searchableText: 'Pear'}},\n {properties: { title: 'Orange', subtitle: 'Sub sub label', searchableText: 'Orange'}}\n];\nfruitSection.setItems(fruitDataSet);\nsections.push(fruitSection);\n \n//Veg section\nvar vegSection = Ti.UI.createListSection({ headerTitle: 'Vegetables'});\nvar vegDataSet = [\n\t{ title: {text: 'Carrots' }, subtitle: { text: 'Sub sub label' }, searchableText: 'Carrots', properties: {title: 'Carrots', subtitle: 'Sub sub label', searchableText: 'Carrots', itemId: 1, accessoryType: Ti.UI.LIST_ACCESSORY_TYPE_DISCLOSURE}},\n { title: {text: 'Potatoes' }, subtitle: { text: 'Sub sub label' }, searchableText: 'Potatoes', properties: { itemId: 2, title: 'Potatoes', subtitle: 'Sub sub label', searchableText: 'Potatoes', accessoryType: Ti.UI.LIST_ACCESSORY_TYPE_DISCLOSURE }},\n {properties: { title: 'Carrots', subtitle: 'Sub sub label', searchableText: 'Carrots'}},\n {properties: { title: 'Potatoes', subtitle: 'Sub sub label', searchableText: 'Potatoes'}},\n];\nvegSection.setItems(vegDataSet);\nsections.push(vegSection);\n \nlistView.sections = sections; //assign sections\n \nvar indices = [{index:0, title: 'F'},\n {index:1, title: 'V'},\n {index:2, title: 'F'}\n ];\nlistView.sectionIndexTitles = indices; //assign indexing\n \nwin.add(listView); //add to win\n \n//Example of appending Fish section\nvar fishSection = Ti.UI.createListSection({ headerTitle: 'Fish'});\nvar fishDataSet = [\n {properties: { title: 'Cod', subtitle: 'Sub sub label', searchableText: 'Cod'}},\n {properties: { title: 'Haddock', subtitle: 'Sub sub label', searchableText: 'Haddock'}},\n];\nfishSection.setItems(fishDataSet);\nlistView.appendSection(fishSection);\n \nwin.open();\n{code}", "updateAuthor": { "name": "wluu", "key": "wluu", "displayName": "Wilson Luu", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2014-01-14T01:39:47.000+0000", "updated": "2014-01-14T01:39:47.000+0000" } ], "maxResults": 4, "total": 4, "startAt": 0 } } }