Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    Hover listgrid error

    We are showing a message in the hover of a field from the listgrid.
    This works ok in Chrome and anothers browsers, but iExplorer shows an error in the console relative to the framework.
    I attach for your information both screen captures (ok and fail) and the source code.
    There is a bug?


    Code:
    					    			isc.ListGrid.create({
    					    			    ID:"grdAlbaranes",  // Si se usa
    					    			    autoDraw:false,
    					    			    autoFetchData:false,
    					    			    showRecordComponents: true,
    					    			    showRecordComponentsByCell: true,
    					    			    //canFreezeFields: true,
    					    			    showFilterEditor:true,
    					    			    autoFitFieldWidths:false,
    					    			    wrapCells: false,
    					    			    dataSource:"ref:attevccamionalbaranesDS",
    					    			    hoverWidth:150,
    					    			    cellHeight:16,
    					    			    fixedRecordHeights:true,
    					    			    canEdit:false,
    					    			    fields:[{
    					    			            name:"botones",
    					    			            width:60,
    					    			            title: " ",
    					    			            canFilter:false
    					    			    	},{
    					    			            name:"ALBS_ID",
    					    			            width:80,
    					    			            showHover:true,
    					    			            hoverHTML: function (record, value, rowNum, colNum, grid){
    					    					          if ((record.IND_DECISION == "S") && (record.IND_INCIDENCIA == "S")){
    					    					              return cargaCamionUIDS.getField("hover.expedicion.faltasIncidencias").title;
    					    					          } else  if (record.IND_DECISION == "S") {
    					    					        	  return cargaCamionUIDS.getField("hover.expedicion.faltas").title;
    					    					          } else if (record.IND_INCIDENCIA == "S") {
    					    					        	  return cargaCamionUIDS.getField("hover.expedicion.incidencias").title; 
    					    					          } else if (record.ESTADO == "P") {
    					    					        	  return cargaCamionUIDS.getField("hover.expedicion.pantalla").title; 
    					    					          }else {
    					    					        	  return cargaCamionUIDS.getField("hover.expedicion.correcta").title; 
    					    					          }  
    					    			            }
    					    			    	},{
    					    			            name:"IND_PARCIALES",
    					    			            width:40
    					    			        },{
    					    			            name:"SERV_ID",
    					    			            width:35
    					    			        },{
    					    			            name:"CLEM_ID_RMTE",
    					    			            width:80
    					    			        },{
    					    			            name:"CLRG_ID_RMTE",
    					    			            width:80
    					    			        },{
    					    			            name:"CLEM_ID_CONS",
    					    			            width:80
    					    			        },{
    					    			            name:"CLRG_ID_CONS",
    					    			            width:80
    					    			        },{
    					    			            name:"DIRECCION_CONS",
    					    			            width:150
    					    			        },{
    					    			            name:"POBLACION_CONS",
    					    			            width:120
    					    			        },{
    					    			            name:"PLZS_ID_ORG",
    					    			            title:"Org",
    					    			            width:40
    					    			        },{
    					    			            name:"PLZS_ID_DES",
    					    			            title:"Des",
    					    			            width:40
    					    			        },{
    					    			            name:"TOT_BULTOS_CARGA",
    					    			            width:60
    					    			        },{
    					    			            name:"NUM_BULTOS_ESCANEADOS",
    					    			            width:60
    					    			        },{
    					    			            name:"NUM_BULTOS_ESC_ANTES",
    					    			            width:60
    					    			        },{
    					    			            name:"PESO_CARGADO",
    					    			            width:80
    					    			        },{
    					    			            name:"VOLUMEN",
    					    			            width:50
    					    			        },{
    					    			            name:"IND_INCIDENCIA",
    					    			            width:40
    					    			        },{
    					    			            name:"IND_GENERAR_FALTA_TOTAL",
    					    			            width:60
    					    		        }],
    					    			    getCellCSSText: function (record, rowNum, colNum) {
    					    			          if (record.IND_DECISION == "S") {
    					    			              return "background-color:#ffccff;";
    					    			          } else  if (record.IND_FALTA == "S") {
    					    			              return "background-color:#FFFF99;";
    					    			          } else if (record.IND_INCIDENCIA == "S") {
    					    			          	  return "background-color:#D0A9F5;";
    					    			          } else if (record.ESTADO == "P") {
    					    			          	  return "background-color:#99CCCC;";
    					    			          }else {
    					    			          	  return "background-color:white;";
    					    			          }  
    					    			    },  
    					    			    initialSort:[{
    					    				    		property:"IND_DECISION", 
    					    				    		direction:"descending"
    					    			  			},{
    					    					      	property:"CLEM_ID_RMTE", 
    					    					      	direction:"ascending"
    					    			  			},{
    					    				    		property:"IND_INCIDENCIA", 
    					    				    		direction:"descending"
    					    			  			},{
    					    					      	property:"ALBS_ID", 
    					    					      	direction:"ascending"
    					    			  }],
    					    			  /**
    					    			   *  SUBGRID Bultos de Albaranes
    					    			   */
    					    			  canExpandRecords: true,
    					    			  expansionMode: "related",
    					    			  detailDS:"ref:attevccamionbultosDS",
    					    			  expansionCanEdit : false,
    					    			  getExpansionComponent : function (record) {
    					    			    	var componenteSubGridBultos = isc.ObjSubgridBultosCC.create({});
    					    			    	componenteSubGridBultos.subgridBultosCC._FILTRO_PADRE = {ALBS_ID: record.ALBS_ID, CCAM_ID: record.CCAM_ID};
    					    			    	componenteSubGridBultos.subgridBultosCC.filterData({ALBS_ID: record.ALBS_ID, CCAM_ID: record.CCAM_ID});
    					    			    	if (record.IND_DECISION != 'S' || record.ESTADO !='A'){
    					    			    		componenteSubGridBultos.botonBuscarObjSubgridBultosCC.disable();
    					    			    		componenteSubGridBultos.botonFaltaParcialObjSubgridBultosCC.disable();
    					    			    	}
    					    			        return componenteSubGridBultos;
    					    			  },
    					    			  createRecordComponent : function (record, colNum) {  
    					    		        var fieldName = this.getFieldName(colNum);  
    					    		
    					    		        if (fieldName == "botones") { 
    					    		        	if ((record["NUM_BULTOS_ESCANEADOS"] == 0) && (record["IND_DECISION"] == "S") && (record["BULTOS_FPARCIAL"] == 0)){   
    						    		            var recordFalta = isc.HLayout.create({
    						    		                height: 16,
    						    		                width:40,
    						    		                align: "center"
    						    		            });
    						    		            if (record["ESTADO"] == "A") {  
    
    						    		            	var aceptarFaltaTotal = isc.ImgButton.create({
    							    			                showDown: false,
    							    			                showRollOver: false,
    							    			                layoutAlign: "center",
    							    			                src: Page.getAppImgDir()+"/delete2.png",
    							    			                prompt: "Aceptar Falta total",
    							    			                height: 16,
    							    			                width: 16,
    							    			                grid: this,
    							    			                visible: true,
    							    			                click : function () {
    							    			                    /*Tras preguntar por creacion incidencia falta total, se marca el registro 
    							    			                	para no volver a buscar y en caso necesario para la generación de incidencia. 
    							    			                	Requiere validar que no se han escaneado ninguno de sus bultos y que todos ellos 
    							    			                	tienen como acción el volver a buscar. 
    							    			                	Para la creacion de incidencia es necesario que el numero de bultos del proceso sea igual 
    							    			                	al numero de bultos de la expedicion, en caso contrario 
    							    			                	solo marcar como falta sin incidencia*/
    							    			                	
    							    			                	miGrid = this.parentElement.parentElement.parentElement;
    							    			            		albsId = miGrid.getRecord(miGrid.getEventRow()).ALBS_ID;
    							    			            		ccamId = miGrid.getRecord(miGrid.getEventRow()).CCAM_ID;
    							    			            		
    							    			                	isc.confirm(cargaCamionUIDS.getField("mensaje.confirm.generar.incTotal").title,
    							    			                			   "marcarFaltaTotal(value)",
    							    			                			   {toolbarButtons : [Dialog.YES, Dialog.NO, Dialog.CANCEL] }
    							    			                	);
    							    			                }
    						    		            	});
    						    		            	recordFalta.addMember(aceptarFaltaTotal);
    
    						    		            } else if (record["ESTADO"] == "F") {
    
    						    		            	var quitarFaltaTotal = isc.ImgButton.create({
    							    			                showDown: false,
    							    			                showRollOver: false,
    							    			                layoutAlign: "center",
    							    			                src: Page.getAppImgDir()+"/delete_verde.png",
    							    			                prompt: "Quitar falta total",
    							    			                height: 16,
    							    			                width: 16,
    							    			                grid: this,
    							    			                visible: true,
    							    			                click : function () {
    
    							    			                	miGrid = this.parentElement.parentElement.parentElement;
    							    			            		albsId = miGrid.getRecord(miGrid.getEventRow()).ALBS_ID;
    							    			            		ccamId = miGrid.getRecord(miGrid.getEventRow()).CCAM_ID;
    							    			                	
    							    			                	isc.confirm(cargaCamionUIDS.getField("mensaje.confirm.quitar.incTotal").title,
    							    			                			   "quitarFaltaTotal(value)"
    							    			                	);  
    							    			                }
    						    		            	});
    						    		            	recordFalta.addMember(quitarFaltaTotal);
    						    		            } 
    						    		            return recordFalta;  
    
    					    		        } else {  
    					    		            return null;  
    					    		        	}	
    					    		        } else {  
    					    		            return null;  
    					    		        }	
    					    					}
    					    			})


    v9.1d_2014-02-22/PowerEdition Development SC and IExplrorer 10.0.9200 navigator, Eclipse Helios and Tomcat 7.0.28
    Attached Files

    #2
    For any JavaScript error, use the instructions in the FAQ to capture a stack trace.

    Comment


      #3
      Originally posted by Isomorphic View Post
      For any JavaScript error, use the instructions in the FAQ to capture a stack trace.
      Have you readed my post? This is not an error of our code.
      This error happens on a Core Isomorphic file, so what do you want to capture? What can you tell me about it?

      Comment


        #4
        Yes, we have read your post.

        It doesn't matter where the error occurs. You still need to follow the instructions in the FAQ.

        Comment


          #5
          Originally posted by Isomorphic View Post
          Yes, we have read your post.

          It doesn't matter where the error occurs. You still need to follow the instructions in the FAQ.
          Well, following your instructions here you got the isomorphic console output (it is so difficult to say that you need the isomorphic log?)
          What changes this?
          Can you now to help us to solve this problem?

          Code:
          10:16:16.547:TMR6:WARN:Log:Error: Argumento no válido.
          Stack from error.stack:
              Canvas._assignSize ()
              Button._assignRectToHandle ()
              Canvas._setHandleRect ()
              Canvas._updateHTML ()
              Canvas.redraw ()
              Canvas.setVisibility ()
              Canvas.show ()
              Hover.show ()
              GridRenderer._showHover ()
              GridRenderer._cellHover ()
          10:16:16.588:TMR7:WARN:Log:Error: Argumento no válido.
          Stack from error.stack:
              Canvas._assignSize ()
              Button._assignRectToHandle ()
              Canvas._setHandleRect ()
              Canvas._updateHTML ()
              Canvas.redraw ()
              Canvas.clearRedrawQueue ()
              Class.fireCallback ()
              Timer._fireTimeout ()
              Unknown script code () @ Unknown script code:1:1

          Comment


            #6
            (it is so difficult to say that you need the isomorphic log?)
            We refer you to the FAQ because it explains which specific log in needed, how to open the tool, which browser(s) are best to use, etc.

            You can avoid being reminded by just posting the log up front. The forums actually tries to remind you to do so in two ways as you type in your post.

            About the error - running code similar to what you've posted doesn't reproduce the error. It could:

            1. using the wrong DOCTYPE (see FAQ)

            2. something corrected since your build was released, especially since it's a development build ("d" build) - you should download a new build from smartclient.com/builds

            3. some kind of unusual CSS in your project - try reverting to just the skin included with SmartClient

            4. something else you haven't shared. If none of the above steps help, try creating a test case that we can run to see the problem

            Comment

            Working...
            X