{
"id": "159446",
"key": "AC-3482",
"fields": {
"issuetype": {
"id": "1",
"description": "A problem which impairs or prevents the functions of the product.",
"name": "Bug",
"subtask": false
},
"project": {
"id": "12217",
"key": "AC",
"name": "Appcelerator - INBOX",
"projectCategory": {
"id": "10000",
"description": "",
"name": "Customer Service"
}
},
"resolution": {
"id": "5",
"description": "All attempts at reproducing this issue failed, or not enough information was available to reproduce the issue. Reading the code produces no clues as to why this behavior would occur. If more information appears later, please reopen the issue.",
"name": "Cannot Reproduce"
},
"resolutiondate": "2016-04-18T06:08:29.000+0000",
"created": "2016-04-10T19:48:46.000+0000",
"labels": [
"ios"
],
"versions": [],
"issuelinks": [],
"assignee": {
"name": "shossain",
"key": "shossain",
"displayName": "Shak Hossain",
"active": false,
"timeZone": "America/Los_Angeles"
},
"updated": "2016-04-18T06:08:29.000+0000",
"status": {
"description": "A resolution has been taken, and it is awaiting verification by reporter. From here issues are either reopened, or are closed.",
"name": "Resolved",
"id": "5",
"statusCategory": {
"id": 3,
"key": "done",
"colorName": "green",
"name": "Done"
}
},
"components": [],
"description": "Hi I am unable to delete selected Item From List View, Please find below sample code.\r\n\r\nMy Index.XML\r\n{code}\r\n\r\n\t\r\n\t\t \r\n\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t \t\t\t\r\n \t \t\r\n \t\t\t\t\t\t\t\t \t\t\r\n\t\t \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \r\n\t\t\t\t \t \t \r\n \t \t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\r\n\t\r\n\r\n{code}\r\n\r\nand Index.js is as follow.\r\n{code}\r\nfunction doClick(e) {\r\n alert($.label.text);\r\n}\r\n\r\n\r\nfunction laodListView()\r\n{\r\n\t\tvar listItemsDataArray = [];\r\n\t\tvar sections= [];\r\n\tvar listRow = {};\t\t\t\r\n\t\tlistRow[\"ItemId\"] = {\r\n\t\t\t\t\ttext :\"1\" \r\n\t\t};\t\t\t\r\n\t\tlistRow[\"PaymentType\"] = {\r\n\t\t\t\t\ttext :\"ACH\" \r\n\t\t};\t\t\r\n\t\tlistRow[\"properties\"] = {\r\n\t\t\t\tcanEdit : \"true\" ,\r\n\t\t\t\t//allowsSelection:\"true\",\t\t\t\t\t\t\t\t\t\t\r\n\t\t};\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\tlistItemsDataArray.push(listRow);\r\n\t\t//$.pymtHistListView.setItems(listItemsDataArray);\r\n\t\tlistRow = {};\r\n\t\tlistRow[\"ItemId\"] = {\r\n\t\t\t\t\ttext :\"2\" \r\n\t\t};\t\t\t\r\n\t\tlistRow[\"PaymentType\"] = {\r\n\t\t\t\t\ttext :\"ACH2\" \r\n\t\t};\t\r\n\t\tlistRow[\"properties\"] = {\r\n\t\t\tcanEdit : \"true\" ,\r\n\t\t\t//allowsSelection:\"true\",\t\t\t\t\t\t\t\t\t\t\r\n\t\t};\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\tlistItemsDataArray.push(listRow);\r\n\t\t//$.pymtHistListView.setItems(listItemsDataArray);\r\n\t\tlistRow = {};\r\n\t\tlistRow[\"ItemId\"] = {\r\n\t\t\t\t\ttext :\"3\" \r\n\t\t};\t\t\t\r\n\t\tlistRow[\"PaymentType\"] = {\r\n\t\t\t\t\ttext :\"ACH3\" \r\n\t\t};\t\t\t\t\t\t\r\n\t\tlistRow[\"properties\"] = {\r\n\t\t\tcanEdit : \"true\" ,\r\n\t\t\t//allowsSelection:\"true\",\t\t\t\t\t\t\t\t\t\t\r\n\t\t};\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\tlistItemsDataArray.push(listRow);\r\n\t\t//$.pymtHistListView.setItems(listItemsDataArray);\r\n\t\tlistRow = {};\r\n\t\tlistRow[\"ItemId\"] = {\r\n\t\t\t\t\ttext :\"4\" \r\n\t\t};\t\t\t\r\n\t\tlistRow[\"PaymentType\"] = {\r\n\t\t\t\t\ttext :\"ACH4\" \r\n\t\t};\t\r\n\t\tlistRow[\"properties\"] = {\r\n\t\t\tcanEdit : \"true\" ,\r\n\t\t\t//allowsSelection:\"true\",\t\t\t\t\t\t\t\t\t\t\r\n\t\t};\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\tlistItemsDataArray.push(listRow);\r\n\t\t//$.pymtHistListView.setItems(listItemsDataArray);\r\n\t\t\t\r\n\t\tTi.API.info(\"List View listItemsDataArray= \"+JSON.stringify(listItemsDataArray));\r\n\t\t$.pymtHistListView.setItems(listItemsDataArray);\r\n\t\t//$.pymtElementsList.setSections($.pymtHistListView);\r\n}\r\n\r\nlaodListView();\r\n\r\nfunction deletePymtRecord(e)\r\n{\r\nTi.API.info(\"&&&&&&& PymtHistWidget INSIDE Function deleteRecord \"+JSON.stringify(e) );\t\t\r\n\tTi.API.info(\"$.$.pymtElementsList = \"+JSON.stringify($.pymtElementsList));\r\n\tTi.API.info(\"$.$.pymtHistListView = \"+JSON.stringify($.pymtHistListView));\r\n\tTi.API.info(\"Currently selected Item Section Index = \"+e.sectionIndex);\r\n\tTi.API.info(\"Currently selected Item Item Index = \"+e.itemIndex);\r\n\t\r\n\talert(\" deletePymtRecord event Called \");\r\n\t\r\n\t\t\r\n\t// Get the clicked item from that section\r\n\tvar item = e.section.getItemAt(e.itemIndex ); \r\n\t\r\n\tTi.API.info(\"Selected Delete Item = \"+JSON.stringify(item));\r\n\t\r\n\t$.pymtElementsList.sections[0].deleteItemsAt(e.itemIndex, item, { animated:true });\r\n\t\r\n\t//$.pymtHistListView.deleteItemsAt(e.itemIndex, item, { animated:true });\r\n\t\r\n\t\r\n\t\r\n\tTi.API.info(\"&&&&&&& Leaving function \"+JSON.stringify(e) );\r\n\t\r\n\t\r\n}\r\n\r\n$.index.open();\r\n{code}\r\n\r\nPlease suggest How I can Delete Item At selected Index",
"attachment": [],
"flagged": false,
"summary": "Hi ,Delete on ListView",
"creator": {
"name": "Sachinkumar_Sharma",
"key": "sachinkumar_sharma",
"displayName": "Sachin",
"active": true,
"timeZone": "America/Los_Angeles"
},
"subtasks": [],
"reporter": {
"name": "Sachinkumar_Sharma",
"key": "sachinkumar_sharma",
"displayName": "Sachin",
"active": true,
"timeZone": "America/Los_Angeles"
},
"environment": "iOS",
"comment": {
"comments": [
{
"id": "382282",
"author": {
"name": "nsalahin",
"key": "nsalahin",
"displayName": "Nazmus Salahin",
"active": true,
"timeZone": "Asia/Dhaka"
},
"body": "Hello,\r\nYou can use \"deleteItemsAt\" to delete a list item row. I am attaching a simple example here.\r\n*index.xml*\r\n{code}\r\n\r\n\t\r\n\t\t\r\n\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\r\n\t\t\r\n\t\r\n\r\n{code}\r\n\r\n*index.js*\r\n{code}\r\nfunction setListView() {\r\n\t$.list.addEventListener('itemclick', function(e) {\r\n\t\te.section.deleteItemsAt(e.itemIndex, 1);\r\n\t});\r\n\r\n}\r\n\r\nsetListView();\r\n\r\n$.index.open();\r\n\r\n{code}\r\n\r\nThanks\r\n",
"updateAuthor": {
"name": "nsalahin",
"key": "nsalahin",
"displayName": "Nazmus Salahin",
"active": true,
"timeZone": "Asia/Dhaka"
},
"created": "2016-04-11T06:17:21.000+0000",
"updated": "2016-04-11T06:17:44.000+0000"
}
],
"maxResults": 1,
"total": 1,
"startAt": 0
}
}
}