SmartClient 8.2
IE9
Problem:
Set first list filter, then set the second one, the browser show an error in the console because JS try to access form attached to listGrid fields declared as
filterEditorType: "SelectItem". But no one form is attached to listGrid fields and then error is showed.
The attached patches add check to verify if form object is not undefined before access his properties.
Sample code:
IE9
Problem:
Set first list filter, then set the second one, the browser show an error in the console because JS try to access form attached to listGrid fields declared as
filterEditorType: "SelectItem". But no one form is attached to listGrid fields and then error is showed.
The attached patches add check to verify if form object is not undefined before access his properties.
Sample code:
Code:
isc.ListGrid.create({ ID: "dashboardHistroy_processList", cellPadding: 4, emptyMessage: "Non č presente alcun processo", dataProperties: { useClientFiltering: false }, dataSource:"processDataSource", canSort:true,showHeaderContextMenu:false,canResizeFields:false,canAutoFitFields:false, width:"100%", height:"100%", alternateRecordStyles:true, cellHeight:40, wrapCells: true, autoFetchData: true,showFilterEditor:true,fixedRecordHeights:false, baseStyle:"tallCell",dateFormatter:"toEuropeanShortDatetime", getFilterEditorValueMap:function (field) { if(field.name == "process_status"){ return {"finished":"Terminato", "unfinished":"In corso"}; }else{ return this.data.getProperty(field.name).getUniqueItems(); } }, dataArrived:function(){ dashboardHistroy_processList.setShowFilterEditor(false); dashboardHistroy_processList.setShowFilterEditor(true); }, cellHoverHTML: function(record, rowNum, colNum){ return "Clicca per vedere i dettagli del processo"; }, canHover: true, showHover: true, hoverWidth:200, valueIconSize:32, filterOnKeypress: true, fields:[ {name:"process_status", title:"Stato", type:"text", width: 100, showValueIconOnly:false,filterEditorType: "SelectItem", valueMap : {"finished":"Terminato", "unfinished":"In corso"}, valueIcons: {"finished":"${properties.staticresourceUrl}/images/green_flag.png", "unfinished":"${properties.staticresourceUrl}/images/loading.png"} }, {name:"process_protocol", title:"Protocollo", width:80, type:"text"}, {name:"process_name", title:"Tipo", width:150, type:"text",filterEditorType: "SelectItem"}, {name:"process_description", title:"Descrizione", width:"*", type:"text"}, {name:"process_currenTaskName", title:"Attivitā", width:200, type:"text",filterEditorType: "SelectItem"}, {name:"process_startUserId", title:"Richiedente", width:80, type:"text",filterEditorType: "SelectItem"}, {name:"process_executionAreaName", title:"Area esecutrice", width:100, type:"text",filterEditorType: "SelectItem"}, {name:"process_startTime", title:"Avviato", width:100, type:"date"} //{name:"process_endTime", title:"Terminato", width:80, type:"date"} ], recordClick: function (viewer, record, recordNum, field, fieldNum, value, rawValue){ dashboardHistroy_processDiagramImage.setSrc(""); dashboardHistroy_processDiagramImage.setSrc("<spring:url value='/app/taskFormBuilder/runtimeDiagram'/>?processInstanceId="+record.process_id); dashboardHistroy_processResume.fetchData({"processInstanceId":record.process_id}); dashboardHistroy_processResume.invalidateCache(); dashboardHistroy_traceLogList.fetchData({"processInstanceId":record.process_id}); dashboardHistroy_traceLogList.invalidateCache(); dashboardHistroy_processTaskInfomrationSection.setSectionTitle(0,"Informazioni sul processo " + record.process_description + " (" + record.process_name + ") : " + (record.process_status == "finished" ? "TERMINATO" : "IN CORSO" + " (" + record.process_currenTaskName + ")")); } });