{ "id": "81135", "key": "TIMOB-5441", "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": "12085", "description": "Mobile @ HQ", "name": "Sprint 2011-45", "archived": true, "released": true, "releaseDate": "2011-11-14" }, { "id": "12580", "description": "Dual Runtime 1.8.0", "name": "Release 1.8.0.1", "archived": true, "released": true, "releaseDate": "2011-12-22" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2011-11-11T09:51:08.000+0000", "created": "2011-10-05T11:00:46.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "module_tableviewrow", "qe-testadded" ], "versions": [ { "id": "11331", "description": "", "name": "Release 1.8.0", "archived": true, "released": true, "releaseDate": "2011-10-31" } ], "issuelinks": [ { "id": "13830", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "outwardIssue": { "id": "82560", "key": "TIMOB-6134", "fields": { "summary": "iOS: jittery labels when re-setting tableview 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": "Low", "id": "4" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } }, { "id": "13910", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "inwardIssue": { "id": "82685", "key": "TIMOB-6165", "fields": { "summary": "iOS: Table View: Refreshing the table view causes a redraw issue, it collapse the table and then expands it back", "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": "14871", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "inwardIssue": { "id": "85462", "key": "TIMOB-7397", "fields": { "summary": "iOS: search result bounces while closing", "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": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2012-01-30T16:40:09.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": "The customer is trying to have a TableView-attached SearchBar perform remote (API) searches. This mostly works... you can retrieve the data, and append the new rows to the table, but \"No Results\" still shows up. Closing the search via \"Cancel\" will slide the \"No Results\" down, revealing the remote data that was added to the TableView.\r\n\r\nIt seems like, perhaps, the filter attribute index on the search is not being updated. Example code:\r\n\r\n{code}\r\nvar win = Ti.UI.createWindow();\r\n\r\nvar search = Ti.UI.createSearchBar({\r\n\tshowCancel: true,\r\n\tautocorrect: false,\r\n\thintText: \"Type in \\\"Remote\\\"\",\r\n\tautocapitalization: Titanium.UI.TEXT_AUTOCAPITALIZATION_NONE,\r\n\tkeyboardType: Ti.UI.KEYBOARD_NUMBERS_PUNCTUATION\r\n});\r\n\r\nvar table = Ti.UI.createTableView({\r\n\tsearch: search,\r\n\tfilterAttribute: \"title\",\r\n\tdata: [\r\n\t\tTi.UI.createTableViewRow({ title: \"Local Data\" }),\r\n\t\tTi.UI.createTableViewRow({ title: \"Local Data\" }),\r\n\t\tTi.UI.createTableViewRow({ title: \"Local Data\" })\r\n\t]\r\n});\r\n\r\nsearch.addEventListener(\"return\", getRemoteData);\r\n\r\nwin.add(table);\r\nwin.open();\r\n\r\nfunction getRemoteData() {\r\n\ttable.setData([\r\n\t\tTi.UI.createTableViewRow({ title: \"Remote Data\" }),\r\n\t\tTi.UI.createTableViewRow({ title: \"Remote Data\" }),\r\n\t\tTi.UI.createTableViewRow({ title: \"Remote Data\" })\r\n\t]);\r\n}\r\n{code}\r\n\r\nREPRO STEPS:\r\n- Open the app\r\n- Notice \"Local Data\"\r\n- Search for \"Remote\"\r\n- Notice \"No Results\", should say \"Remote Data\"\r\n- Cancel search\r\n- Notice \"Remote Data\"", "attachment": [], "flagged": false, "summary": "iOS: Adding TableViewRow doesn't update index for SearchBar", "creator": { "name": "matthewcongrove", "key": "matthewcongrove", "displayName": "Matthew Congrove", "active": true, "timeZone": "America/Chicago" }, "subtasks": [], "reporter": { "name": "matthewcongrove", "key": "matthewcongrove", "displayName": "Matthew Congrove", "active": true, "timeZone": "America/Chicago" }, "environment": "iOS 4.3\r\nTiMob CI SDK", "comment": { "comments": [ { "id": "168084", "author": { "name": "blainhamon", "key": "blainhamon", "displayName": "Blain Hamon", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Pull request pending: https://github.com/appcelerator/titanium_mobile/pull/531", "updateAuthor": { "name": "blainhamon", "key": "blainhamon", "displayName": "Blain Hamon", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-10-05T15:32:32.000+0000", "updated": "2011-10-05T15:32:32.000+0000" }, { "id": "168986", "author": { "name": "matthewcongrove", "key": "matthewcongrove", "displayName": "Matthew Congrove", "active": true, "timeZone": "America/Chicago" }, "body": "Hey Blain,\r\n\r\nThat fix is working, but has cropped up another issue related to rendering. If the row has labels, views, etc contained within it, those are not properly rendered. Here's a video of the issue:\r\n\r\nhttp://screencast.com/t/av1HBrUeK\r\n\r\nHere's the code to repro:\r\n\r\n{code}\r\nvar win = Ti.UI.createWindow();\r\n\r\nvar search = Ti.UI.createSearchBar({\r\n\tshowCancel: true,\r\n\tautocorrect: false,\r\n\thintText: \"Type in \\\"Remote\\\"\",\r\n\tautocapitalization: Titanium.UI.TEXT_AUTOCAPITALIZATION_NONE,\r\n\tkeyboardType: Ti.UI.KEYBOARD_NUMBERS_PUNCTUATION\r\n});\r\n\r\nvar table = Ti.UI.createTableView({\r\n\tsearch: search,\r\n\tfilterAttribute: \"i\",\r\n\tdata: [\r\n\t\tTi.UI.createTableViewRow({ title: \"Local Data\", i: \"Local Data\" }),\r\n\t\tTi.UI.createTableViewRow({ title: \"Local Data\", i: \"Local Data\" }),\r\n\t\tTi.UI.createTableViewRow({ title: \"Local Data\", i: \"Local Data\" })\r\n\t]\r\n});\r\n\r\nsearch.addEventListener(\"return\", getRemoteData);\r\n\r\nwin.add(table);\r\nwin.open();\r\n\r\nfunction getRemoteData() {\r\n\tvar rows = [];\r\n\t\r\n\tfor(var i = 0; i < 3; i++) {\r\n\t\tvar row = Ti.UI.createTableViewRow({\r\n\t\t\ti: \"Remote\"\r\n\t\t});\r\n\t\t\r\n\t\tvar label = Ti.UI.createLabel({\r\n\t\t\ttext: \"Remote Data\",\r\n\t\t\twidth: \"auto\",\r\n\t\t\theight: \"auto\"\r\n\t\t});\r\n\t\t\r\n\t\trow.add(label);\r\n\t\trows.push(row);\r\n\t}\r\n\t\r\n\ttable.setData(rows);\r\n}\r\n{code}\r\n\r\nShould this be another bug, or was it related to any changes you made to resolve this one?", "updateAuthor": { "name": "matthewcongrove", "key": "matthewcongrove", "displayName": "Matthew Congrove", "active": true, "timeZone": "America/Chicago" }, "created": "2011-10-12T08:35:27.000+0000", "updated": "2011-10-12T08:36:03.000+0000" }, { "id": "169706", "author": { "name": "mark.e.allen@emc.com", "key": "mark.e.allen@emc.com", "displayName": "Mark Allen", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Has the second issue in this thread (\"That fix is working, but has cropped up another issue related to rendering. If the row has labels, views, etc contained within it, those are not properly rendered.\") identified by Matt Congrove been reviewed/fixed?", "updateAuthor": { "name": "mark.e.allen@emc.com", "key": "mark.e.allen@emc.com", "displayName": "Mark Allen", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-10-19T11:20:05.000+0000", "updated": "2011-10-19T11:20:05.000+0000" }, { "id": "172165", "author": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "body": "The fix for TIMOB-6134 is the same as the fix for some visual issues caused by searching a table with complex rows.", "updateAuthor": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-11-10T10:04:31.000+0000", "updated": "2011-11-10T10:04:31.000+0000" }, { "id": "172889", "author": { "name": "mark.e.allen@emc.com", "key": "mark.e.allen@emc.com", "displayName": "Mark Allen", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Hello,\r\n\r\nI downloaded the latest build (listed below) and ran our application. Good news, bad news. Good news is that the first line of the row displays without issue. Bad news is that the data on lines 2 and 3 of the row do not display - they disappear. \r\n\r\nThe function that creates the row(s) is listed below:\r\n\r\nfunction createRows(data) {\r\nApp.UI.ServiceRequestList.readImage = [];\r\nvar rows = [];\r\n// Loop through each SR, create a row\r\nfor(var i = 0; i < data.length; i++) {\r\nvar row\t = Ti.UI.createTableViewRow(App.UI.ServiceRequestList.style.tableRow);\r\nvar imgViewSeverity\t = Ti.UI.createImageView(App.UI.ServiceRequestList.style.imgViewSeverity);\r\nvar severityLabel\t = Ti.UI.createLabel(App.UI.ServiceRequestList.style.severityLabel);\r\nvar srIdLabel\t = Ti.UI.createLabel(App.UI.ServiceRequestList.style.srIdLabel);\r\nvar lastUpdateLabel\t = Ti.UI.createLabel(App.UI.ServiceRequestList.style.lastUpdateLabel);\r\nvar partyNameLabel\t = Ti.UI.createLabel(App.UI.ServiceRequestList.style.partyNameLabel);\r\nvar problemSummaryLabel\t= Ti.UI.createLabel(App.UI.ServiceRequestList.style.problemSummaryLabel);\r\nvar readImage\t = Ti.UI.createView(App.UI.ServiceRequestList.style.readImage);\r\nApp.UI.ServiceRequestList.readImage.push(readImage);\r\nswitch(data[i].severity) {\r\ncase \"S1\":\r\nseverityImage\t = \"S1\";\r\nseverityFontColor\t= \"#FFFFFF\";\r\nbreak;\r\ncase \"S2\":\r\nseverityImage\t = \"S2\";\r\nseverityFontColor\t= \"#FFFFFF\";\r\nbreak;\r\ncase \"S3\":\r\nseverityImage\t = \"S3\";\r\nseverityFontColor\t= \"#FFFFFF\";\r\nbreak;\r\ndefault:\r\nseverityImage\t = \"S4\";\r\nseverityFontColor\t= \"#666666\";\r\nbreak;\r\n}\r\nApp.UI.merge(row, {\r\nid: data[i].srNumber\r\n});\r\nApp.UI.merge(imgViewSeverity, {\r\nimage: DIR_IMAGE + severityImage + \".png\"\r\n});\r\n//severity label will sit 'on top of' the imageView\r\nApp.UI.merge(severityLabel, {\r\ntext: data[i].severity,\r\n//backgroundImage: DIR_IMAGE + severityImage + \".png\",\r\ncolor: \"#\" + severityFontColor\r\n});\r\nApp.UI.merge(srIdLabel, {\r\ntext: data[i].srNumber\r\n});\r\n//display next action date if listed sorted by next action date or severity. display last updated date if list sorted by last updated date or SR Number\r\nif(App.read(\"srlist_sortby\") && (App.read(\"srlist_sortby\") == SORT_NEXT_ACTION_DATE || App.read(\"srlist_sortby\") == SORT_SEVERITY)) {\r\nApp.UI.merge(lastUpdateLabel, {\r\ntext: data[i].nextActionDate,\r\ncolor: \"red\"\r\n});\r\n}\r\nelse if (App.read(\"srlist_sortby\") && (App.read(\"srlist_sortby\") == SORT_SR_NUMBER || App.read(\"srlist_sortby\") == SORT_MOST_RECENT)) {\r\nApp.UI.merge(lastUpdateLabel, {\r\ntext: data[i].lastUpdatedDate,\r\ncolor: \"blue\"\r\n});\r\n}\r\nelse {\r\nApp.UI.merge(lastUpdateLabel, {\r\ntext: data[i].nextActionDate,\r\ncolor: \"red\"\r\n});\r\n}\r\n\r\nApp.UI.merge(partyNameLabel, {\r\ntext: data[i].partyName\r\n});\r\nApp.UI.merge(problemSummaryLabel, {\r\ntext: data[i].problemSummary,\r\n});\r\nApp.UI.merge(readImage, {\r\nvisible: (data[i].srRead == 0) ? true : false\r\n});\r\nrow.add(imgViewSeverity);\r\nrow.add(severityLabel);\r\nrow.add(srIdLabel);\r\nrow.add(lastUpdateLabel);\r\nrow.add(partyNameLabel);\r\nrow.add(problemSummaryLabel);\r\nrow.add(readImage);\r\nrows.push(row);\r\n}\r\nreturn rows;\r\n};\r\n\r\n--------------------------------------------------------------------\r\n\r\n\r\nApp.UI.ServiceRequestList.style = {\r\nwin: {\r\ntitle: Ti.Locale.getString(\"My_SRs\"),\r\ntabBarHidden: true,\r\nbarColor: \"#000\",\r\nbarImage: DIR_IMAGE + \"emc_topBar.png\"\r\n},\r\nbuttonSettings: {\r\ntitleid: \"Settings\"\r\n},\r\nbuttonActions: {\r\nsystemButton:Titanium.UI.iPhone.SystemButton.ACTION\r\n},\r\nview: {\r\nwidth: \"100%\",\r\nheight: \"100%\",\r\ntop: 0,\r\nleft: 0,\r\nbackgroundColor: \"#C5CCD4\"\r\n},\r\ntable: {\r\nwidth: Ti.Platform.displayCaps.platformWidth,\r\nheight: \"100%\",\r\nsearchHidden: true\r\n},\r\ntableRow: {\r\nheight: 78,\r\nhasChild: true,\r\nselectedBackgroundImage: \"none\",\r\nselectionStyle: Ti.UI.iPhone.TableViewCellSelectionStyle.none\r\n},\r\nsearchBar: {\r\nbarColor: \"#ABABAB\",\r\nshowCancel: true,\r\nautocorrect: false,\r\nautocapitalization: Titanium.UI.TEXT_AUTOCAPITALIZATION_NONE,\r\nhinttextid: \"SR_Number\",\r\nkeyboardType: Ti.UI.KEYBOARD_NUMBERS_PUNCTUATION\r\n},\r\nseverityLabel: {\r\ntop: 5,\r\nleft: 30,\r\nwidth: 30,\r\nheight: 20,\r\nfont: {\r\nfontSize: 12,\r\nfontWeight: \"bold\"\r\n},\r\ncolor: \"#FFF\",\r\ntextAlign: \"center\"\r\n},\r\nimgViewSeverity: {\r\ntop: 5,\r\nleft: 30,\r\nwidth: 30,\r\nheight: 20\r\n},\r\nsrIdLabel: {\r\ntop: 5,\r\nleft: 65,\r\nright: 50,\r\nheight: \"auto\",\r\nfont: {\r\nfontSize: 16,\r\nfontWeight: \"bold\"\r\n}\r\n},\r\nlastUpdateLabel: {\r\ntop: 5,\r\nright: 5,\r\nwidth: \"auto\",\r\ntextAlign: \"right\",\r\nheight: \"auto\",\r\nfont: {\r\nfontSize: 12\r\n},\r\ncolor: \"#385487\"\r\n},\r\npartyNameLabel: {\r\ntop: 25,\r\nleft: 30,\r\nright: 5,\r\nheight: 16,\r\nfont: {\r\nfontSize: 12,\r\nfontWeight: \"bold\"\r\n},\r\ncolor: \"#666\"\r\n},\r\nproblemSummaryLabel: {\r\ntop: 41,\r\nleft: 30,\r\nright: 5,\r\nheight: 32,\r\nfont: {\r\nfontSize: 12\r\n},\r\ncolor: \"#999\"\r\n},\r\nreadImage: {\r\nborderColor: \"#3780EC\",\r\nborderWidth: 1,\r\nborderRadius: 5,\r\ntop: 34,\r\nleft: 10,\r\nheight: 10,\r\nwidth: 10,\r\nbackgroundGradient: {\r\ntype: \"linear\",\r\ncolors: [ \"#4F98F6\", \"#226BE4\" ],\r\nstartPoint: { x: 0, y: 0 },\r\nendPoint: { x: 0, y: 10 },\r\nbackFillStart: false\r\n}\r\n}\r\n};", "updateAuthor": { "name": "mark.e.allen@emc.com", "key": "mark.e.allen@emc.com", "displayName": "Mark Allen", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-11-16T04:57:05.000+0000", "updated": "2011-11-16T04:57:05.000+0000" }, { "id": "173008", "author": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Mark -\r\n\r\nThat is an issue for a separate ticket. Please file one with community, or if you are working with CS, please inform them of the need and your sample code.", "updateAuthor": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-11-16T16:03:08.000+0000", "updated": "2011-11-16T16:03:08.000+0000" }, { "id": "173578", "author": { "name": "mpettiford", "key": "mpettiford", "displayName": "Michael Pettiford", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Tested with Ti Studio 1.0.7.201111182325 on OSX Lion\r\nTi Mob SDK 1.8.0.1.v20111121090256\r\niPhone 4S OS 5.0, iPad 2 OS 4.3.5\r\n\r\nSearch bar and table view rows functioning properly", "updateAuthor": { "name": "mpettiford", "key": "mpettiford", "displayName": "Michael Pettiford", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-11-21T15:36:59.000+0000", "updated": "2011-11-21T15:36:59.000+0000" } ], "maxResults": 8, "total": 8, "startAt": 0 } } }