{ "id": "61644", "key": "TIMOB-1012", "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": "11224", "name": "Release 1.4.0", "archived": true, "released": true, "releaseDate": "2010-07-16" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2011-04-17T01:54:57.000+0000", "created": "2011-04-15T02:41:29.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [], "versions": [], "issuelinks": [], "assignee": { "name": "blainhamon", "key": "blainhamon", "displayName": "Blain Hamon", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2011-04-17T01:54:57.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}

when you click a row the bg color for the row is changed and\nhasCheck is set to true. if you click it again, the row bg color\ngoes back to white and hasCheck is false. the issue is that some\nrows become grey when not clicked - seems to be row repaint issue.\nhere's the code:

\n
\nvar win = Titanium.UI.createWindow();\n\n//win.row = null;\n\n    var inputData = [ \n        {title:'Children', leftImage:'icons/children.png', backgroundColor:'#fff', test:'children.js', header:'C'},\n        {title:'Coffee', leftImage:'icons/coffe.png', backgroundColor:'#fff', test:'coffe.js'},          \n                     \n        {title:'Dating', leftImage:'icons/dating.png', backgroundColor:'#fff', test:'dating.js', header:'D'},\n        {title:'Diabetes', leftImage:'icons/diabetes.png', backgroundColor:'#fff', test:'diabetes.js'},\n        {title:'Diet', leftImage:'icons/diet.png', backgroundColor:'#fff', test:'goals.js'},\n        {title:'Dream', leftImage:'icons/cloud2.png', backgroundColor:'#fff', test:'dreams.js'},\n        {title:'Driving', leftImage:'icons/driving.png', backgroundColor:'#fff', test:'goals.js'},\n        \n        {title:'Fotboll', leftImage:'icons/fotboll.png', backgroundColor:'#fff', test:'goals.js', header:'F'},\n        \n        {title:'Game', leftImage:'icons/games.png', backgroundColor:'#fff', test:'goals.js', header:'G'},\n        {title:'Gift', leftImage:'icons/gift.png', backgroundColor:'#fff', test:'gift.js'},\n        {title:'Golf', leftImage:'icons/golf.png', backgroundColor:'#fff', test:'golf.js'},\n        \n        {title:'Headache', leftImage:'icons/zap.png', backgroundColor:'#fff', test:'headache.js', header:'H'}, \n        \n        {title:'Location', leftImage:'icons/map.png', header:'L'},\n        \n        {title:'Medicin', leftImage:'icons/pills.png', backgroundColor:'#fff', test:'medicine.js', header:'M'},\n        {title:'Money', leftImage:'icons/economy.png', backgroundColor:'#fff', test:'goals.js'},\n        {title:'Music', leftImage:'icons/music.png', backgroundColor:'#fff', test:'goals.js'}, \n        {title:'My pain', leftImage:'icons/pain.png', backgroundColor:'#fff', test:'pain.js'},\n        \n        {title:'Outfit', leftImage:'icons/tshirt.png', backgroundColor:'#fff', test:'outfit.js', header:'O'}, \n        \n        {title:'Pet', leftImage:'icons/pet.png', test:'pet.js', header:'P'},\n        {title:'Poker', leftImage:'icons/poker.png', backgroundColor:'#fff', test:'goals.js'},\n        {title:'Pregnancy', leftImage:'icons/baby.png', backgroundColor:'#fff', test:'goals.js'},\n        \n        {title:'Sport', leftImage:'icons/sport.png', backgroundColor:'#fff', test:'goals.js', header:'S'},\n        {title:'Smoking', leftImage:'icons/smoke.png', backgroundColor:'#fff', test:'smoking.js'},\n        \n        {title:'Training', leftImage:'icons/bicyckling.png', test:'training.js', header:'T'},\n        \n        {title:'Water', leftImage:'icons/water.png', backgroundColor:'#fff', test:'water.js', header:'W'},\n        {title:'Worktime', leftImage:'icons/working.png', backgroundColor:'#fff', test:'clockin.js'},\n\n        //{title:'Make your own diary', leftImage:'icons/diet.png', header:'', leftImage2:'icons/empty.png', backgroundColor:'#fff'},\n        {title:'New diaries requests', header:'', hasChild:true},   \n        {title:'Special group requests', hasChild:true} \n    ];\n\nvar tableview = Titanium.UI.createTableView({\n    data:inputData,\n    editable:true,\n    //backgroundColor:'transparent',\n    title:'Diary library',\n    style:Titanium.UI.iPhone.TableViewStyle.GROUPED\n    });\n\nvar c=0;\nvar y=0;\n// create table view event listener\ntableview.addEventListener('click', function(e)\n{\n    // event data\n    var index = e.index;\n    var row = e.row;\n    Ti.API.info('row ' + index + ' bgColor ' + row.backgroundColor)\n    if (row.backgroundColor != '#E2E2E2' && index<26)\n    {   \n        var color = '#E2E2E2';\n        row.className = 'checked';\n        row.backgroundColor = color;\n        row.hasCheck = true;\n\n    }\n    else\n    {\n        row.backgroundColor = '#fff';\n        row.hasCheck = false;\n        row.className = 'no_check'\n    }\n    \n});\n\nwin.add(tableview);\n\nwin.open();\n
{html}", "attachment": [], "flagged": false, "summary": "table view row painting issue when changing row data", "creator": { "name": "nwright", "key": "nwright", "displayName": "Nolan Wright", "active": false, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "nwright", "key": "nwright", "displayName": "Nolan Wright", "active": false, "timeZone": "America/Los_Angeles" }, "environment": null, "comment": { "comments": [ { "id": "124569", "author": { "name": "jhaynie", "key": "jhaynie", "displayName": "Jeff Haynie", "active": false, "timeZone": "America/Los_Angeles" }, "body": "{html}

(from [90e432f60a3734bf17b3b57f63f86985b88b29d0])\nCloses #1012 . TableRows with an invalid or null\nbackground color have white applied instead instead of leaving them\nunchanged. \nhttp://github.com/appcelerator/titanium_mobile/commit/90e432f60a373...

{html}", "updateAuthor": { "name": "jhaynie", "key": "jhaynie", "displayName": "Jeff Haynie", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T02:41:30.000+0000", "updated": "2011-04-15T02:41:30.000+0000" } ], "maxResults": 1, "total": 1, "startAt": 0 } } }