{ "id": "161198", "key": "AC-3881", "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": "8", "description": "", "name": "Needs more info" }, "resolutiondate": "2016-06-29T14:54:30.000+0000", "created": "2016-06-20T07:56:49.000+0000", "labels": [ "android" ], "versions": [ { "id": "17038", "name": "Appcelerator Studio 4.5.0", "archived": false, "released": false } ], "issuelinks": [], "assignee": { "name": "shossain", "key": "shossain", "displayName": "Shak Hossain", "active": false, "timeZone": "America/Los_Angeles" }, "updated": "2016-06-29T14:54:30.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": "14548", "name": "Titanium SDK & CLI", "description": "Please enter tickets related to the MobileSDK here." } ], "description": "Hello,\r\n\r\nWhen I open a window with a listview inside. crash the application ( Android only ).\r\n\r\n\r\n{code:java}\r\n[ERROR] : TiApplication: (main) [69555,75253] Sending event: exception on thread: main msg:java.lang.IndexOutOfBoundsException: Invalid index 4, size is 1; Titanium 5.3.0,2016/06/01 10:18,94fa8af\r\n[ERROR] : TiApplication: java.lang.IndexOutOfBoundsException: Invalid index 4, size is 1\r\n[ERROR] : TiApplication: \tat java.util.ArrayList.throwIndexOutOfBoundsException(ArrayList.java:255)\r\n[ERROR] : TiApplication: \tat java.util.ArrayList.get(ArrayList.java:308)\r\n[ERROR] : TiApplication: \tat android.widget.HeaderViewListAdapter.isEnabled(HeaderViewListAdapter.java:164)\r\n[ERROR] : TiApplication: \tat android.widget.AbsListView.onInitializeAccessibilityNodeInfoForItem(AbsListView.java:2525)\r\n[ERROR] : TiApplication: \tat android.widget.ListView.onInitializeAccessibilityNodeInfoForItem(ListView.java:3949)\r\n[ERROR] : TiApplication: \tat android.widget.AbsListView$ListItemAccessibilityDelegate.onInitializeAccessibilityNodeInfo(AbsListView.java:2452)\r\n[ERROR] : TiApplication: \tat android.view.View.onInitializeAccessibilityNodeInfo(View.java:6079)\r\n[ERROR] : TiApplication: \tat android.view.View.createAccessibilityNodeInfoInte\r\n[ERROR] : TiApplication: \tat android.view.View$AccessibilityDelegate.createAccessibilityNodeInfo(View.java:22348)\r\n[ERROR] : TiApplication: \tat android.view.View.createAccessibilityNodeInfo(View.java:6023)\r\n[ERROR] : TiApplication: \tat android.view.accessibility.AccessibilityRecord.setSource(AccessibilityRecord.java:145)\r\n[ERROR] : TiApplication: \tat android.view.accessibility.AccessibilityRecord.setSource(AccessibilityRecord.java:119)\r\n[ERROR] : TiApplication: \tat android.view.View.onInitializeAccessibilityEventInternal(View.java:5977)\r\n[ERROR] : TiApplication: \tat android.view.View$AccessibilityDelegate.onInitializeAccessibilityEvent(View.java:22260)\r\n[ERROR] : TiApplication: \tat android.view.View.onInitializeAccessibilityEvent(View.java:5963)\r\n[ERROR] : TiApplication: \tat android.view.View.sendAccessibilityEventUncheckedInternal(View.java:5830)\r\n[ERROR] : TiApplication: \tat android.view.View$AccessibilityDelegate.sendAccessibilityEventUnchecked(View.java:22199)\r\n[ERROR] : TiApplication: \tat android.view.View.sendAccessibilityEventUnchecked(View.java:5813)\r\n[ERROR] : TiApplication: \tat android.view.ViewRootImpl$SendWindowContentChangedAccessibilityEvent.run(ViewRootImpl.java:7285)\r\n[ERROR] : TiApplication: \tat android.view.ViewRootImpl$SendWindowContentChangedAccessibilityEvent.runOrPost(ViewRootImpl.java:7311)\r\n[ERROR] : TiApplication: \tat android.view.ViewRootImpl.postSendWindowContentChangedCallback(ViewRootImpl.java:6402)\r\n[ERROR] : TiApplication: \tat android.view.ViewRootImpl.notifySubtreeAccessibilityStateChanged(ViewRootImpl.java:6581)\r\n[ERROR] : TiApplication: \tat android.view.ViewGroup.notifySubtreeAccessibilityStateChanged(ViewGroup.java:3003)\r\n[ERROR] : TiApplication: \tat android.view.ViewGroup.notifySubtreeAccessibilityStateChanged(ViewGroup.java:3003)\r\n[ERROR] : TiApplication: \tat android.view.ViewGroup.notifySubtreeAccessibilityStateChanged(ViewGroup.java:3003)\r\n[ERROR] : TiApplication: \tat android.view.ViewGroup.notifySubtreeAccessibilityStateChanged(ViewGroup.java:3003)\r\n[ERROR] : TiApplication: \tat android.view.ViewGroup.notifySubtreeAccessibilityStateChanged(ViewGroup.java:3003)\r\n[ERROR] : TiApplication: \tat android.view.ViewGroup.notifySubtreeAccessibilityStateChanged(ViewGroup.java:3003)\r\n[ERROR] : TiApplication: \tat android.view.ViewGroup.notifySubtreeAccessibilityStateChanged(ViewGroup.java:3003)\r\n[ERROR] : TiApplication: \tat android.view.ViewGroup.notifySubtreeAccessibilityStateChanged(ViewGroup.java:3003)\r\n[ERROR] : TiApplication: \tat android.view.ViewGroup.notifySubtreeAccessibilityStateChanged(ViewGroup.java:3003)\r\n[ERROR] : TiApplication: \tat android.view.ViewGroup.notifySubtreeAccessibilityStateChanged(ViewGroup.java:3003)\r\n[ERROR] : TiApplication: \tat android.view.ViewGroup.notifySubtreeAccessibilityStateChanged(ViewGroup.java:3003)\r\n[ERROR] : TiApplication: \tat android.view.ViewGroup.notifySubtreeAccessibilityStateChanged(ViewGroup.java:3003)\r\n[ERROR] : TiApplication: \tat android.view.ViewGroup.notifySubtreeAccessibilityStateChanged(ViewGroup.java:3003)\r\n[ERROR] : TiApplication: \tat android.view.ViewGroup.notifySubtreeAccessibilityStateChanged(ViewGroup.java:3003)\r\n[ERROR] : TiApplication: \tat android.view.ViewGroup.notifySubtreeAccessibilityStateChanged(ViewGroup.java:3003)\r\n[ERROR] : TiApplication: \tat android.view.ViewGroup.notifySubtreeAccessibilityStateChanged(ViewGroup.java:3003)\r\n[ERROR] : TiApplication: \tat android.view.ViewGroup.notifySubtreeAccessibilityStateChanged(ViewGroup.java:3003)\r\n[ERROR] : TiApplication: \tat android.view.View.notifySubtreeAccessibilityStateChangedIfNeeded(View.java:8803)\r\n[ERROR] : TiApplication: \tat android.view.View.setFrame(View.java:16774)\r\n[ERROR] : TiApplication: \tat android.view.View.layout(View.java:16656)\r\n[ERROR] : TiApplication: \tat android.view.ViewGroup.layout(ViewGroup.java:5439)\r\n[ERROR] : TiApplication: \tat android.widget.ListView.setupChild(ListView.java:1971)\r\n[ERROR] : TiApplication: \tat android.widget.ListView.makeAndAddView(ListView.java:1881)\r\n[ERROR] : TiApplication: \tat android.widget.ListView.fillSpecific(ListView.java:1357)\r\n[ERROR] : TiApplication: \tat android.widget.ListView.layoutChildren(ListView.java:1665)\r\n[ERROR] : TiApplication: \tat\r\n{code}\r\n\r\nhappens only on LG android 6.0.1 on G4\r\n\r\ntks\r\nbye", "attachment": [], "flagged": false, "summary": "crash problem on android on a listview", "creator": { "name": "rocket13011", "key": "rocket13011", "displayName": "alexandre orilia", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "rocket13011", "key": "rocket13011", "displayName": "alexandre orilia", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "Appcelerator Studio, build: 4.5.0.201602170821\r\ntitanium sdk : 5.3.0 GA\r\nOS X : 10.11.5\r\nAndroid LG G4 // 6.0.1", "comment": { "comments": [ { "id": "388856", "author": { "name": "sdarda", "key": "sdarda", "displayName": "Sharif AbuDarda", "active": false, "timeZone": "Asia/Dhaka" }, "body": "The issue seems to be with this line [ERROR] : TiApplication: java.lang.IndexOutOfBoundsException: Invalid index 4, size is 1.\r\nPlease share the test code that causing the problem. Thanks.", "updateAuthor": { "name": "sdarda", "key": "sdarda", "displayName": "Sharif AbuDarda", "active": false, "timeZone": "Asia/Dhaka" }, "created": "2016-06-22T18:22:25.000+0000", "updated": "2016-06-22T18:22:25.000+0000" }, { "id": "388918", "author": { "name": "rocket13011", "key": "rocket13011", "displayName": "alexandre orilia", "active": true, "timeZone": "America/Los_Angeles" }, "body": "\r\nlist_module.js\r\n{code:java}\r\nvar _args = arguments[0] || {};\r\nvar id_arg = _args.itemId;\r\nvar id_room = id_arg;\r\n\r\n/********************Intialisation de la page*********************/\r\nvar jeedom = Alloy.Globals.jeedom;\r\n/**********************Variable Globals***************************/\r\nvar TypeDisplay = 'list';\r\nvar ListCmd = [];\r\n/********************Fonction de la page RESUME DOMOTIQUE **************************/\r\nfunction summaryPage(){\r\n var objectStatut = jeedom.summary.StatutObject(id_room);\r\n var FirstobjectStatut = 0;\r\n if(objectStatut.light.total == 0){\r\n var objectLight = '';\r\n var objectLightClassIcon = '';\r\n var objectLightLeft = '';\r\n var objectLightLeftIcon = '';\r\n }else{\r\n var objectLightClassIcon = Alloy.Globals.icon('icon jeedomapp-ampoule-on');\r\n if(objectStatut.light.on > 0){\r\n var objectLightColor = '#4ADBA6';\r\n }else{\r\n var objectLightColor = '#555555';\r\n }\r\n var objectLight = objectStatut.light.on+'/'+objectStatut.light.total;\r\n var objectLightLeft = 5;\r\n var objectLightLeftIcon = 20;\r\n if(FirstobjectStatut == 0){\r\n var objectLightLeftIcon = '';\r\n FirstobjectStatut = 1;\r\n }\r\n \r\n }\r\n \r\n if(objectStatut.energy.total == 0){\r\n var objectEnergy = '';\r\n var objectEnergyClassIcon = '';\r\n var objectEnergyLeft = 0;\r\n var objectEnergyLeftIcon = 0;\r\n }else{\r\n var objectEnergy = objectStatut.energy.on+'/'+objectStatut.energy.total;\r\n var objectEnergyClassIcon = Alloy.Globals.icon('icon jeedomapp-prise');\r\n var objectEnergyLeft = 5;\r\n var objectEnergyLeftIcon = 20;\r\n if(FirstobjectStatut == 0){\r\n var objectEnergyLeftIcon = '';\r\n FirstobjectStatut = 1;\r\n }\r\n }\r\n if(objectStatut.open.total == 0){\r\n var objectOpen = '';\r\n var objectOpenClassIcon = '';\r\n var objectOpenLeft = 0;\r\n var objectOpenLeftIcon = 0;\r\n }else{\r\n var objectOpen = objectStatut.open.on+'/'+objectStatut.open.total;\r\n var objectOpenClassIcon = Alloy.Globals.icon('icon jeedomapp-ouvrants');\r\n if(objectStatut.open.on > 0){\r\n var objectOpenColor = '#F77B7B';\r\n }else{\r\n var objectOpenColor = '#555555';\r\n }\r\n var objectOpenLeft = 5;\r\n var objectOpenLeftIcon = 20;\r\n if(FirstobjectStatut == 0){\r\n var objectOpenLeftIcon = '';\r\n FirstobjectStatut = 1;\r\n }\r\n }\r\n if(objectStatut.flap.total == 0){\r\n var objectFlap = '';\r\n var objectFlapClassIcon = '';\r\n var objectFlapLeft = 0;\r\n var objectFlapLeftIcon = 0;\r\n }else{\r\n var objectFlap = objectStatut.flap.on+'/'+objectStatut.flap.total;\r\n var objectFlapClassIcon = Alloy.Globals.icon('icon jeedomapp-volet-ouvert');\r\n if(objectStatut.flap.on > 0){\r\n var objectFlapColor = '#F77B7B';\r\n }else{\r\n var objectFlapColor = '#555555';\r\n }\r\n var objectFlapLeft = 5;\r\n var objectFlapLeftIcon = 20;\r\n if(FirstobjectStatut == 0){\r\n var objectFlapLeftIcon = '';\r\n FirstobjectStatut = 1;\r\n }\r\n }\r\n if(objectStatut.temperature.total == 0){\r\n var objectTemperature = '';\r\n var objectTemperatureClassIcon = '';\r\n var objectTemperatureLeft = 0;\r\n var objectTemperatureLeftIcon = 0;\r\n }else{\r\n var objectTemperature = objectStatut.temperature.on/objectStatut.temperature.total;\r\n objectTemperature = objectTemperature.toFixed(1);\r\n var objectTemperatureClassIcon = Alloy.Globals.icon('icon jeedomapp-temperature');\r\n var objectTemperatureLeft = 5;\r\n var objectTemperatureLeftIcon = 20;\r\n if(FirstobjectStatut == 0){\r\n var objectTemperatureLeft = '';\r\n FirstobjectStatut = 1;\r\n }\r\n }\r\n \r\n $.userLightPhoto.left = objectLightLeftIcon;\r\n $.userLightPhoto.text = objectLightClassIcon['text'];\r\n $.userLightPhoto.color = objectLightColor;\r\n $.userLight.text = objectLight;\r\n $.userLight.left = objectLightLeft;\r\n \r\n $.userOpenPhoto.left = objectOpenLeftIcon;\r\n $.userOpenPhoto.text = objectOpenClassIcon['text'];\r\n $.userOpenPhoto.color = objectOpenColor;\r\n $.userOpen.text = objectOpen;\r\n $.userOpen.left = objectOpenLeft;\r\n \r\n $.userFlapPhoto.left = objectFlapLeftIcon;\r\n $.userFlapPhoto.text = objectFlapClassIcon['text'];\r\n $.userFlapPhoto.color = objectFlapColor;\r\n $.userFlap.text = objectFlap;\r\n $.userFlap.left = objectFlapLeft;\r\n \r\n $.userTemperaturePhoto.left = objectTemperatureLeftIcon;\r\n $.userTemperaturePhoto.text = objectTemperatureClassIcon['text'];\r\n $.userTemperature.text = objectTemperature;\r\n $.userTemperature.left = objectTemperatureLeft;\r\n}\r\n/********************Fonction de la page MODULE **************************/\r\n//recuperation des EqLogic//\r\nfunction displayEqLogicByObjectId(_id){\r\n try{\r\n Alloy.Globals.select.section = 0;\r\n var list = [];\r\n var paireorimpaire = 0;\r\n var eqLogic = jeedom.eqLogic.byObjectId({\r\n object_id : _id\r\n });\r\n for (var i in eqLogic) {\r\n eqLogic[i].display({\r\n display : TypeDisplay,\r\n success : function(_data){\r\n if(_data != undefined){\r\n for (var j in _data) {\r\n if(paireorimpaire%2 == 1){\r\n _data[j].backgroundlolo = {};\r\n _data[j].backgroundlolo.backgroundColor = \"#FAFAFA\";\r\n }\r\n list.push(_data[j]);\r\n paireorimpaire++;\r\n var section = Ti.UI.createListSection();\r\n section.setItems(list);\r\n $.listViewIn_Room.setSections([section]);\r\n }\r\n }\r\n }\r\n });\r\n }\r\n listCmdByObjectId(_id);\r\n Alloy.Globals.loading.hide();\r\n Alloy.Globals.select.section = 0;\r\n setTimeout(reloadPieceall , 2000);\r\n function reloadPieceall(){\r\n Alloy.Globals.select.section = 0;\r\n jeedom.event(\"app:reloadpiece\", {\r\n fin : 'ok'\r\n });\r\n };\r\n }catch (error){\r\n jeedom.log.add('[DISPLAY] '+error.message, 'error', 'Error');\r\n alert('erreur > '+error.message);\r\n }\r\n};\r\n\r\nfunction listCmdByObjectId(_id){\r\n var eqLogic = jeedom.eqLogic.byObjectId({\r\n object_id : _id\r\n });\r\n for (var i in eqLogic) {\r\n var cmd = jeedom.cmd.byEqLogicId({\r\n eqLogic_id : eqLogic[i]['id']\r\n });\r\n for (var j in cmd){\r\n ListCmd[cmd[j]['id']] = eqLogic[i]['id'];\r\n }\r\n }\r\n};\r\n/****************************functions bouton de la page****************************/\r\n\r\nfunction cmd_go(id,slidervalue){\r\n var cmd = [];\r\n var idtheme = Math.floor(Math.random() * 1000);\r\n cmd[idtheme] = jeedom.cmd.byId({\r\n id : id\r\n }); \r\n if(slidervalue !== 'nok'){\r\n cmd[idtheme].execCmd({\r\n options : {\r\n slider : slidervalue\r\n },\r\n success : function(data) {\r\n Alloy.Globals.loading.hide();\r\n }\r\n });\r\n }else{\r\n cmd[idtheme].execCmd({\r\n success : function(data) {\r\n Alloy.Globals.loading.hide();\r\n }\r\n });\r\n }\r\n cmd[idtheme] = null;\r\n idtheme = null;\r\n}\r\n\r\nfunction buttonList(e){\r\n if(e.section.items[e.itemIndex].BoutonLight.valeur != null){\r\n var dataType = e.section.items[e.itemIndex];\r\n dataType.template = 'LightTemplateRecharge';\r\n $.listViewIn_Room.sections[0].updateItemAt(e.itemIndex, dataType);\r\n cmd_go(e.section.items[e.itemIndex].BoutonLight.idcommande,'nok');\r\n }\r\n};\r\nfunction SliderList(e){\r\n if(e.source.value != null){\r\n Alloy.Globals.loading.show('Commande en cours', false);\r\n cmd_go(e.section.items[e.itemIndex].SliderLight.idvaleur,e.source.value);\r\n }\r\n};\r\n\r\n//Bouton Multiple\r\nfunction Btn_1(e){\r\n if(e.section.items[e.itemIndex].Btn_1.idcommande != null){\r\n var dataType = e.section.items[e.itemIndex];\r\n dataType.maj.zIndex = 10;\r\n Alloy.Globals.loading.show('Commande en cours', false);\r\n $.listViewIn_Room.sections[0].updateItemAt(e.itemIndex, dataType);\r\n cmd_go(e.section.items[e.itemIndex].Btn_1.idcommande,'nok');\r\n } \r\n};\r\nfunction Btn_2(e){\r\n if(e.section.items[e.itemIndex].Btn_2.idcommande != null){\r\n var dataType = e.section.items[e.itemIndex];\r\n dataType.maj.zIndex = 10;\r\n Alloy.Globals.loading.show('Commande en cours', false);\r\n $.listViewIn_Room.sections[0].updateItemAt(e.itemIndex, dataType);\r\n cmd_go(e.section.items[e.itemIndex].Btn_2.idcommande,'nok');\r\n } \r\n};\r\nfunction Btn_3(e){\r\n if(e.section.items[e.itemIndex].Btn_3.idcommande != null){\r\n var dataType = e.section.items[e.itemIndex];\r\n dataType.maj.zIndex = 10;\r\n Alloy.Globals.loading.show('Commande en cours', false);\r\n $.listViewIn_Room.sections[0].updateItemAt(e.itemIndex, dataType);\r\n cmd_go(e.section.items[e.itemIndex].Btn_3.idcommande,'nok');\r\n } \r\n};\r\nfunction Btn_4(e){\r\n if(e.section.items[e.itemIndex].Btn_4.idcommande != null){\r\n var dataType = e.section.items[e.itemIndex];\r\n dataType.maj.zIndex = 10;\r\n Alloy.Globals.loading.show('Commande en cours', false);\r\n $.listViewIn_Room.sections[0].updateItemAt(e.itemIndex, dataType);\r\n cmd_go(e.section.items[e.itemIndex].Btn_4.idcommande,'nok');\r\n }\r\n};\r\nfunction Btn_5(e){\r\n if(e.section.items[e.itemIndex].Btn_5.idcommande != null){\r\n var dataType = e.section.items[e.itemIndex];\r\n dataType.maj.zIndex = 10;\r\n Alloy.Globals.loading.show('Commande en cours', false);\r\n $.listViewIn_Room.sections[0].updateItemAt(e.itemIndex, dataType);\r\n cmd_go(e.section.items[e.itemIndex].Btn_5.idcommande,'nok');\r\n } \r\n};\r\n//COLOR\r\nfunction buttonColor(e){\r\n if(e.section.items[e.itemIndex].rond.idcommande != null){\r\n var idcommande = e.section.items[e.itemIndex].rond.idcommande;\r\n var color_value = e.section.items[e.itemIndex].rond.color_value;\r\n var eqid = e.section.items[e.itemIndex].rond.eqId;\r\n }\r\n var payloadcolor = {color_light : color_value,title : 'Couleur',viewopen : 'module/color_picker',itemId_color : idcommande, eqlogicId : eqid};\r\n Alloy.Globals.pagenavmodal('window_modal',payloadcolor);\r\n};\r\n/****************************OnItemClick****************************/\r\n\r\nfunction rowDoubletap(e){\r\n var item = $.listViewIn_Room.sections[0].items[e.itemIndex];\r\n jeedom.log.console('[Design] press in module : eqlogic/idemId >'+item.properties.itemId, 'debug');\r\n jeedom.display.page(item.properties.itemId,item.properties.typo);\r\n};\r\n\r\n/****************************Pull to refresh de la page****************************/\r\n// myRefresher est la function du Pull to Refrech //\r\nfunction myRefresher(e) {\r\n \r\n function ping(e){\r\n jeedom.log.add('pull to refresh (sections)', 'info', '-----------------PING-------------------');\r\n jeedom.ping({\r\n success : function(data) {\r\n jeedom.log.add('test', 'info', 'Success');\r\n jeedom.log.add('test', 'info', '-----------------------------------------------');\r\n sync(e);\r\n },\r\n error : function(data) {\r\n jeedom.log.add('test', 'error', data.message);\r\n jeedom.log.add('test', 'info', '-----------------------------------------------');\r\n alert('Erreur Impossible de ce connecter à votre Box');\r\n e.hide();\r\n }\r\n });\r\n }\r\n function sync(e){\r\n var objet_sync = jeedom.object.byId({\r\n id : id_room\r\n });\r\n jeedom.log.add('pull to refresh (sections)', 'info', '-----------------SYNC-------------------');\r\n objet_sync.updateCmdValue({\r\n success : function(data) {\r\n displayEqLogicByObjectId(id_room);\r\n summaryPage();\r\n jeedom.log.add('pull to refresh (sections)', 'info', 'Success');\r\n jeedom.log.add('pull to refresh (sections)', 'info', '-----------------------------------------------');\r\n e.hide();\r\n },\r\n error: function(){\r\n jeedom.log.add('pull to refresh (sections)', 'info', 'Error');\r\n jeedom.log.add('pull to refresh (sections)', 'info', '-----------------------------------------------');\r\n alert('Erreur Impossible de ce connecter à votre Box');\r\n e.hide();\r\n }\r\n });\r\n \r\n }\r\n ping(e); \r\n};\r\n\r\n/****************************Lanceur de la page****************************/\r\ndisplayEqLogicByObjectId(id_room);\r\nsummaryPage();\r\nsetTimeout(cmdupdate, 2000);\r\n\r\n/****************************Listener de la page****************************/\r\nfunction cmdupdate(){\r\njeedom.listen('cmd::update', function(_data) {\r\n if(Alloy.Globals.windowOpen == 'list_module'){\r\n if(_data.value !== undefined){\r\n jeedom.log.add('EVENT', 'info', 'Event cmd::update prit en compte par la page '+id_room+' > : ' + _data.cmd_id + '// value :'+_data.value);\r\n if(ListCmd[_data.cmd_id] !== undefined){\r\n jeedom.log.add('EVENT', 'info', 'Mise à jour dans la List '+id_room+' > : ' + _data.cmd_id + '// value :'+_data.value);\r\n var cmdlistener = jeedom.cmd.byId({\r\n id : _data.cmd_id\r\n });\r\n var ChangeData = $.listViewIn_Room.sections[0].items;\r\n var end_changedata = false;\r\n for (var k in ChangeData) {\r\n if(end_changedata == false){\r\n var idData = ChangeData[k].properties.itemId;\r\n if(idData !== 'null'){\r\n jeedom.log.add('EVENT', 'info', 'IdData tester > '+idData+' Pour le '+cmdlistener['eqLogic_id']);\r\n if(idData == cmdlistener['eqLogic_id']){\r\n var eqLogiclistener = jeedom.eqLogic.byId({\r\n id : cmdlistener['eqLogic_id']\r\n });\r\n eqLogiclistener.display({\r\n display : TypeDisplay,\r\n success : function(_data){\r\n if(_data != undefined){\r\n var nbr_tableau = 0;\r\n for (var z in _data) {\r\n nbr_tableau++;\r\n }\r\n if(nbr_tableau == 1){\r\n jeedom.log.add('EVENT', 'info', 'Chargement du nouvel Item > '+k);\r\n if(ChangeData[k].backgroundlolo != undefined){\r\n if(ChangeData[k].backgroundlolo.backgroundColor != undefined){\r\n _data[0].backgroundlolo = {};\r\n _data[0].backgroundlolo.backgroundColor = ChangeData[k].backgroundlolo.backgroundColor;\r\n }\r\n }\r\n $.listViewIn_Room.sections[0].updateItemAt(k, _data[0]);\r\n summaryPage();\r\n }else{\r\n Ti.API.info(JSON.stringify(_data[l]));\r\n for (var l in _data) {\r\n Ti.API.info('test de la '+_data[l].properties.stateId+ ' > '+cmdlistener['id']+' // tableau >'+JSON.stringify(_data[l]));\r\n if(_data[l].properties.stateId == cmdlistener['id']){\r\n if(end_changedata == false){\r\n if(ChangeData[k].properties.stateId !== undefined){\r\n if(ChangeData[k].properties.stateId == _data[l].properties.stateId){\r\n if(ChangeData[k].backgroundlolo != undefined){\r\n if(ChangeData[k].backgroundlolo.backgroundColor != undefined){\r\n _data[l].backgroundlolo = {};\r\n _data[l].backgroundlolo.backgroundColor = ChangeData[k].backgroundlolo.backgroundColor;\r\n }\r\n }\r\n jeedom.log.add('EVENT', 'info', 'Chargement du nouvel Item > '+Number(k));\r\n $.listViewIn_Room.sections[0].updateItemAt(Number(k), _data[l]);\r\n end_changedata = true;\r\n summaryPage();\r\n }\r\n }else{\r\n if(ChangeData[k].backgroundlolo != undefined){\r\n if(ChangeData[k].backgroundlolo.backgroundColor != undefined){\r\n _data[l].backgroundlolo = {};\r\n _data[l].backgroundlolo.backgroundColor = ChangeData[k].backgroundlolo.backgroundColor;\r\n }\r\n }\r\n jeedom.log.add('EVENT', 'info', 'Chargement du nouvel Item > '+Number(k));\r\n $.listViewIn_Room.sections[0].updateItemAt(Number(k), _data[l]);\r\n end_changedata = true;\r\n summaryPage();\r\n }\r\n }\r\n }\r\n }\r\n }\r\n \r\n }\r\n }\r\n }); \r\n }\r\n }\r\n }\r\n }\r\n } \r\n }\r\n }\r\n});\r\n};\r\n{code}\r\n\r\nList_module.xml\r\n{code:java}\r\n\r\n\t\r\n\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n \r\n\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\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\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\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\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\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t\t\t\t\t\r\n\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\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\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\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\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\r\n\r\n{code}\r\n\r\nList_module.tss\r\n{code:java}\r\n\".container\":{\r\n\tbackgroundColor: \"#fff\",\r\n\ttheme: \"appcelerator\"\r\n}\r\n\r\n\"Window\": {\r\n\tbackgroundColor: \"#fff\"\r\n}\r\n\r\n\"Label\": {\r\n\twidth: Ti.UI.SIZE,\r\n\theight: Ti.UI.SIZE,\r\n\tcolor: \"#000\",\r\n\tfont: {\r\n\t\tfontSize: 20,\r\n\t\tfontFamily: Alloy.Globals.fontFamily.Light\r\n\t},\r\n\ttextAlign: 'center'\r\n}\r\n\"#listViewIn_Room[platform=ios]\":{\r\n\tseparatorStyle: Ti.UI.iPhone.ListViewSeparatorStyle.NONE,\r\n\tselectionStyle: Ti.UI.iPhone.ListViewCellSelectionStyle.NONE\r\n}\r\n\r\n//resumer domotique\r\n\".resume_domotique\":{\r\n\t\"width\": \"100%\",\r\n\t\"height\": \"8%\",\r\n\tbackgroundColor: \"#F6F6F6\",\r\n\ttop: 0,\r\n\tcolor: \"#555555\"\r\n}\r\n\r\n\".center_resume_domotique\":{\r\n\twidth: Ti.UI.SIZE,\r\n\theight: Ti.UI.SIZE,\r\n\tlayout: 'horizontal'\r\n}\r\n\r\n\".body\":{\r\n\t\"height\": \"92%\",\r\n\t\"top\": \"8%\"\r\n}\r\n// ROOM //\r\n\".template_In_Room\":{\r\n\theight: 100,\r\n\twidth: Ti.UI.FILL\r\n}\r\n\".template_In_Room_Light_slider\":{\r\n\theight: 110,\r\n\twidth: Ti.UI.FILL\r\n}\r\n\r\n\".template_In_Room_Light_color\":{\r\n\theight: 110,\r\n\twidth: Ti.UI.FILL\r\n}\r\n\r\n\".left-buffer\":{\r\n\tleft: 0,\r\n\tzIndex: \"5\",\r\n\tbackgroundColor: \"white\"\r\n}\r\n\r\n\".avatar_In_Room\":{\r\n\ttop: 35,\r\n\tleft: 30\r\n}\r\n\r\n\".avatar_In_Room_bouton\":{\r\n\ttop: 35,\r\n\tleft: 30\r\n}\r\n\".avatar_In_Room_state\":{\r\n\ttop: 10,\r\n\tleft: 30\r\n}\r\n\r\n\".maj\":{\r\n\tleft: 10,\r\n\tbackgroundColor : \"#4DFF0000\"\r\n}\r\n\r\n\".smoothavatarIn_RoomBorderRadius\": {\r\n\theight: 50,\r\n\twidth: 50,\r\n\ttop: 25,\r\n\tleft: 10\r\n}\r\n\r\n\".avatar\":{\r\n\theight: 75,\r\n\twidth: 75,\r\n\ttop: 12,\r\n\tleft: 10,\r\n\tborderRadius: 35\r\n}\r\n\".smoothAvatarBorderRadius\": {\r\n\theight: 75,\r\n\twidth: 75,\r\n\ttop: 12,\r\n\tleft: 0,\r\n\tborderRadius: 35,\r\n\topacity: 0.6\r\n}\r\n\r\n\".avatar_In_Room_state\":{\r\n\theight: 25,\r\n\twidth: 25,\r\n\ttop: 5,\r\n\tleft: 25\r\n}\r\n\r\n\".smoothavatarIn_RoomBorderRadius_state\": {\r\n\theight: 25,\r\n\twidth: 25,\r\n\ttop: 5,\r\n\tleft: 25\r\n}\r\n\r\n\".vgroup\":{\r\n\tlayout: 'vertical'\r\n},\r\n\".hgroup\":{\r\n\tlayout: 'horizontal'\r\n},\r\n\r\n\".moduleState\":{\r\n\tfont:{\r\n\t\tfontSize: 30\r\n\t},\r\n\tleft: 0,\r\n\ttop: 33,\r\n\twidth: 77,\r\n\ttextAlign: 'center',\r\n\tcolor: \"#48dba4\"\r\n}\r\n\".moduleUnite\":{\r\n\tfont:{\r\n\t\tfontSize: 18\r\n\t},\r\n\tleft: 0,\r\n\ttop: 70,\r\n\twidth: 77,\r\n\ttextAlign: 'center',\r\n\tcolor: \"#48dba4\"\r\n}\r\n\r\n\".left\":{\r\n\tleft: 10\r\n}\r\n\r\n\".size\":{\r\n\theight: Ti.UI.SIZE,\r\n\twidth: Ti.UI.SIZE\r\n}\r\n\".title\":{\r\n\tfont:{\r\n\t\tfontSize: 14\r\n\t},\r\n\tleft: 85,\r\n\tcolor: \"#444\"\r\n}\r\n\r\n\".subtitle\":{\r\n\tfont:{\r\n\t\tfontSize: 10\r\n\t},\r\n\tleft: 85,\r\n\theight: Ti.UI.SIZE,\r\n\tcolor: \"#666\"\r\n}\r\n\".subtitlebottom\":{\r\n\tfont:{\r\n\t\tfontSize: 10\r\n\t},\r\n\tleft: 85,\r\n\tcolor: \"#666\"\r\n}\r\n\".slider\":{\r\n\tleft: 85,\r\n\twidth: '70%',\r\n\tbottom: 5\r\n}\r\n\r\n\".gray-line\":{\r\n\tbackgroundColor: \"#ececec\",\r\n\twidth: Ti.UI.FILL,\r\n\theight: 1\r\n}\r\n\r\n\".bottom\":{\r\n\tbottom: 0\r\n}\r\n\r\n\".moduleStop\":{\r\n\tleft: 95,\r\n\theight: 40,\r\n\twidth: 40\r\n}\r\n\".moduleDown\":{\r\n\tleft: 145,\r\n\theight: 40,\r\n\twidth: 40\r\n}\r\n\".moduleUp\":{\r\n\tleft: 195,\r\n\theight: 40,\r\n\twidth: 40\r\n}\r\n\".photolight\":{\r\n\tleft: 85,\r\n\ttop: 5,\r\n\theight: 16,\r\n\twidth: 16\r\n}\r\n\".photo\":{\r\n\tfont: {\r\n\t\tfontSize:19,\r\n\t\tfontFamily: 'jeedomapp'\t\r\n\t},\r\n\tcolor: \"#666\"\r\n},\r\n\".user\":{\r\n\tfont:{\r\n\t\tfontSize: 12\r\n\t},\r\n\tcolor: \"#666\"\r\n}\r\n\".btnlabel\":{\r\n\ttop: 5\r\n}\r\n\r\n\".rond_color_fine\":{\r\n\tleft: \"10\",\r\n\twidth : \"70dp\",\r\n\theight : \"70dp\",\r\n\tborderWidth: \"1dp\",\r\n\tborderColor: \"#ececec\",\r\n\tborderRadius : '35dp'\r\n}\r\n\".rond_color\":{\r\n\twidth : \"45dp\",\r\n\theight : \"45dp\",\r\n\tborderRadius : '22.5dp',\r\n\tborderWidth: \"1dp\",\r\n\tborderColor: \"#ececec\",\r\n\tright : \"15\",\r\n}\r\n\r\n\"#color_picker\":{\r\n\twidth : \"42dp\",\r\n\theight : \"40dp\",\r\n\timage : '/images/color_picker.png',\r\n\tzIndex: \"10\"\r\n}\r\n\r\n\".refresh\":{\r\n\theight: \"100%\",\r\n\twidth: \"100%\",\r\n\tbackgroundColor: \"#80dbf6e4\",\r\n\tzIndex : 11\r\n}\r\n{code}\r\n\r\nfunction openWindow\r\n{code:java}\r\nvar page = Ti.UI.createWindow({\r\n theme: \"jeedom.WindowNew\",\r\n navBarHidden: false,\r\n orientationModes: [Ti.UI.PORTRAIT, Ti.UI.UPSIDE_PORTRAIT],\r\n backgroundColor:'#00FFFFFF',\r\n title: payload.title\r\n \r\n });\r\n var actionBar_new;\r\n page.addEventListener(\"open\", function() {\r\n if (! page.activity) {\r\n Ti.API.error(\"Can't access action bar on a lightweight window.\");\r\n } else {\r\n actionBar_new = page.activity.actionBar;\r\n if (actionBar_new) {\r\n actionBar_new.title = payload.title;\r\n actionBar_new.displayHomeAsUp = true;\r\n actionBar_new.onHomeIconItemSelected = function() {\r\n //container.animate(slide_it_left_out);\r\n //slide_it_left_out.addEventListener('complete', function () {\r\n page.close();\r\n Alloy.Globals.windowOpen = 'index';\r\n //});\r\n };\r\n }\r\n }\r\n });\r\n var container = Ti.UI.createView();\r\n var viewopen = Alloy.createController(payload.viewopen,payload).getView();\r\n container.add(viewopen);\r\n page.add(container);\r\n Alloy.Globals.windowOpen = payload.viewopen;\r\n page.open(); \r\n{code}\r\n\r\nTks", "updateAuthor": { "name": "rocket13011", "key": "rocket13011", "displayName": "alexandre orilia", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2016-06-23T10:00:47.000+0000", "updated": "2016-06-23T10:00:47.000+0000" }, { "id": "389022", "author": { "name": "sdarda", "key": "sdarda", "displayName": "Sharif AbuDarda", "active": false, "timeZone": "Asia/Dhaka" }, "body": "Hello, The code you sent has missing components. It's not suffuicient to regenerate. Please attach a full regeneratable test code. Perhaps a sample project that successfully generate the issue. ", "updateAuthor": { "name": "sdarda", "key": "sdarda", "displayName": "Sharif AbuDarda", "active": false, "timeZone": "Asia/Dhaka" }, "created": "2016-06-24T13:16:12.000+0000", "updated": "2016-06-24T13:16:12.000+0000" } ], "maxResults": 3, "total": 3, "startAt": 0 } } }