PDA

View Full Version : 'locked' is null or not an object error in IE 8



renganathan
22 Nov 2011, 10:15 PM
Hi all,

i am getting error in IE


Message: 'locked' is null or not an object
Line: 15
Char: 166181
Code: 0
URI: http://bgl11-laser-cvs/extjs/ext-all.js

i have shared the code below.. please help me to fix this problem


Ext.onReady(function()
{
Ext.QuickTips.init();
function createInvGrid(queryId, queryString)
{
var favoriteResultStore = Ext.create('Ext.data.Store',
{
autoLoad : true,
loadmask : true,
fields : ['lab_name', 'aisle', 'aisle_location', 'ip_address', 'sl_num', 'user_id_ref', 'pid', 'description', 'status', 'eitms_num', 'created_date'],
proxy :
{
type : 'ajax',
url : '../src/search.class.php?action=execute',
actionMethods : { create: 'POST', destroy: 'DELETE', read: 'POST', update: 'POST'},
extraParams :
{
queryId : queryId,
queryString : queryString
},
reader:
{
type :'json',
root : 'search',
totalProperty : 'total'
}
}
});
var favoriteResultGrid = Ext.create ('Ext.grid.GridPanel',
{
id : 'favoriteResultGrid',
store : favoriteResultStore,
title : 'Inventory Search results',
collapsible : true,
renderTo : 'favoriteGridWrapper',
columns :
[
{id:'lab_name', header: "Lab", sortable: true, dataIndex: 'lab_name'},
{id:'aisle', header: "aisle", sortable: true, dataIndex: 'aisle'},
{id: 'aisle_location', header: "aisle location", sortable: true, dataIndex: 'aisle_location'},
{id: 'ip_address', header: "Ip address", sortable: true, dataIndex: 'ip_address'},
{id: 'pid', header: "PID", sortable: true, dataIndex: 'pid'},
{id: 'description', header: "Description", sortable: true, dataIndex: 'description'},
{id: 'status', header: "Status", sortable: true, dataIndex: 'status'},
{id: 'sl_num', header: "SL.No", sortable: true, dataIndex: 'sl_num'},
{id: 'eitms_num', header: "eITMS", sortable: true, dataIndex: 'eitms_num'},
{id: 'created_date', header: "Date", sortable: true, dataIndex: 'created_date'},
{id: 'user_id_ref', header: "owner", sortable: true, dataIndex: 'user_id_ref'}
],
forceFit : true,
columnLines : true,
stripeRows : true,
loadMask : true
});
return ;
}
function createPowerGrid(queryId)
{
var favoriteResultStore = Ext.create('Ext.data.Store',
{
autoLoad : true,
loadmask : true,
fields : ['ulid', 'pdu_ip', 'pdu_port', 'device_ip', 'outlet_owner', 'pdu_manufacturer'],
proxy :
{
type : 'ajax',
url : '../src/search.class.php',
actionMethods : { create: 'POST', destroy: 'DELETE', read: 'POST', update: 'POST'},
extraParams :
{
queryId : queryId,
search_type : 'power',
action : 'execute_power_search'

},
reader:
{
type :'json',
root : 'searchResultData',
totalProperty : 'total'
}
}
});
var favoriteResultGrid = Ext.create ('Ext.grid.GridPanel',
{
id : 'favoriteResultGrid',
store : favoriteResultStore,
title : 'Power Search results',
collapsible : true,
renderTo : 'favoriteGridWrapper',
columns :
[
{id:'ulid', header: "Lab", sortable: true, dataIndex: 'ulid'},
{id:'pdu_ip', header: "PDU IP", sortable: true, dataIndex: 'pdu_ip'},
{id: 'pdu_port', header: "Port", sortable: true, dataIndex: 'pdu_port'},
{id: 'device_ip', header: "Device IP", sortable: true, dataIndex: 'device_ip'},
{id: 'outlet_owner', header: "Outlet Owner", sortable: true, dataIndex: 'outlet_owner'},
{id: 'pdu_manufacturer', header: "PDU Manufacturer", sortable: true, dataIndex: 'pdu_manufacturer'}
],
forceFit : true,
columnLines : true,
stripeRows : true,
loadMask : true
});
return ;
}

function createRuGrid(queryId)
{
var favoriteResultStore = Ext.create('Ext.data.Store',
{
autoLoad : true,
loadmask : true,
fields : ['lab', 'org', 'rack', 'ip', 'slNum', 'status'],
proxy :
{
type : 'ajax',
url : '../src/favoriteSearchResultData.php',
actionMethods : { create: 'POST', destroy: 'DELETE', read: 'POST', update: 'POST'},
extraParams :
{
queryId : queryId

},
reader:
{
type :'json',
root : 'searchResultData',
totalProperty : 'total'
}
}
});
var favoriteResultGrid = Ext.create ('Ext.grid.GridPanel',
{
id : 'favoriteResultGrid',
store : favoriteResultStore,
title : 'Resource Utilization Search results',
collapsible : true,
renderTo : 'favoriteGridWrapper',
columns :
[
{id:'lab', header: "Lab", sortable: true, dataIndex: 'lab'},
{id: 'name', header: "org", sortable: true, dataIndex: 'org'},
{id:'rack', header: "rack", sortable: true, dataIndex: 'rack'},
{id: 'ip', header: "ipAddress", sortable: true, dataIndex: 'ip'},
{id: 'slNum', header: "Serial No.", sortable: true, dataIndex: 'slNum'},
{id: 'status', header: "Connectivity", sortable: true, dataIndex: 'status'}
],
forceFit : true,
columnLines : true,
stripeRows : true,
loadMask : true
});
return ;
}

var selectedRecordQueryId = '';
var favoriteStore = Ext.create('Ext.data.Store',
{
autoLoad : true,
loadmask : false,
fields : ['query_id', 'query_name', 'query_type', 'query_string','visibility'],
proxy :
{
type : 'ajax',
url : '../src/search.class.php?action=listSearch',
actionMethods : { create: 'POST', destroy: 'DELETE', read: 'POST', update: 'POST'},
extraParams :
{

},
reader:
{
type :'json',
root : 'list',
totalProperty : 'total'
}
}
});
var selectedRowIndx = -1;
var favoriteSelectionMod = new Ext.selection.CheckboxModel(
{
mode : 'SINGLE',
listeners :
{
checkOnly : true,
selectionchange: function(model, record, options)
{
if (model.getCount())
{
selectedRowIndx = Ext.getCmp('favoriteSearch').getStore().indexOf(record[0]);
Ext.getCmp('favoriteExecuteButton').enable();
} else
{
Ext.getCmp('favoriteExecuteButton').disable();
}
}
}
});
var favoriteSearch = new Ext.grid.GridPanel(
{
id : 'favoriteSearch',
store : favoriteStore,
title : 'Favorite search',
autoWidth : true,
autoHeight : true,
collapsible : true,
autoscroll : true,
columns :
[
{id:'query_id', header: "Query Id", width: 60, sortable: true, dataIndex: 'query_id'},
{id:'query_name', header: "Query Name", width: 100, sortable: true, dataIndex: 'query_name'},
{id:'query_type', header: "Query Type", width: 80, sortable: true, dataIndex: 'query_type'},
{id:'visibility', header: "Visibility", width: 80, sortable: true, dataIndex: 'visibility'},
{id:'query_string', header: "Query String", width: 600, sortable: true, dataIndex: 'query_string'},

],
selModel : favoriteSelectionMod,
columnLines : true,
stripeRows : true,
renderTo : 'favoriteSearchWrapper',
tbar : new Ext.Toolbar (
{
items:
[
{
text :'execute',
id :'favoriteExecuteButton',
tooltip :'execute favorite query',
iconCls :'execute favorite query',
handler : function ()
{
selectedRecordQueryId = favoriteStore.getAt(selectedRowIndx).get('query_id');
var selectedRecordQueryType = favoriteStore.getAt(selectedRowIndx).get('query_type');
var selectedRecordQueryString = favoriteStore.getAt(selectedRowIndx).get('query_string');
document.getElementById("favoriteGridWrapper").innerHTML = "";
if (selectedRecordQueryType == 'inventory')
{
createInvGrid(selectedRecordQueryId, selectedRecordQueryString);
}
else if (selectedRecordQueryType == 'power')
{
createPowerGrid(selectedRecordQueryId);
}
else if (selectedRecordQueryType == 'resourceutilization')
{
createRuGrid(selectedRecordQueryId);
}
}
}
]
})
});
});
function edit_search()
{
var OrgStoreDefault = new Ext.data.SimpleStore(
{
fields : ['orgid', 'orgname']
});
var RackNameStoreDefault = new Ext.data.SimpleStore(
{
fields : ['aisle']
});
var RackNumStoreDefault = new Ext.data.SimpleStore(
{
fields : ['aisle_location']
});
var LabStore = Ext.create('Ext.data.Store',
{
autoLoad : true,
loadmask : false,
fields : ['ulid'],
proxy :
{
type : 'ajax',
url : '../src/profile_labs.class.php?action=getLabs',
reader :
{
type:'json',
root: 'labs'
}
},
storeId: 'LabStore'
});
var labDeviceField = new Ext.form.ComboBox(
{
name :'lab',
fieldLabel : 'Lab',
store : LabStore,
bodyStyle :'padding:15px',
loadmask :false,
mode : 'local',
displayField : 'ulid',
valueField : 'ulid',
allowBlank : false,
anchor :'95%',
triggerAction : 'all',
listeners:
{
change: function()
{
refreshOrgNames(this.getValue(),BuFieldDevice);
}
}
});

var BuFieldDevice = new Ext.form.ComboBox({
name :'bu',
fieldLabel : 'BU',
store : OrgStoreDefault,
mode : 'local',
displayField : 'orgname',
valueField : 'orgid',
allowBlank : false,
editable : false,
anchor :'95%',
triggerAction : 'all',
listeners:
{
change: function()
{
refreshRackNames(this.getValue(),labDeviceField.getValue(),AisleFieldDevice);
}
}
});


var AisleFieldDevice = new Ext.form.ComboBox(
{
name:'Aisle',
fieldLabel: 'Aisle',
store : RackNameStoreDefault,
mode : 'local',
displayField : 'aisle',
valueField : 'aisle',
allowBlank : false,
editable : false,
anchor :'95%',
triggerAction : 'all',
listeners:
{
change: function()
{
refreshRackNumbers(this.getValue(),BuFieldDevice.getValue(),labDeviceField.getValue(),AisleLocFieldDevice);
}
}
});

var AisleLocFieldDevice = new Ext.form.ComboBox(
{
name:'AisleLoc',
fieldLabel: 'Aisle Location',
store : RackNumStoreDefault,
mode : 'local',
displayField : 'aisle_location',
valueField : 'aisle_location',
allowBlank : false,
editable : false,
anchor :'95%',
triggerAction : 'all'
});

var ipAddr = new Ext.form.TextField(
{
fieldLabel: 'IP Address',
name: 'ipAddr'
});

var serialNo = new Ext.form.TextField(
{
fieldLabel: 'Serial Number',
name: 'serialNo'
});

var devStatus = new Ext.form.TextField(
{
fieldLabel: 'Device Status',
name: 'devStatus'
});

var pid = new Ext.form.TextField(
{
fieldLabel: 'Product-ID',
name: 'pid'
});

var pdesc = new Ext.form.TextField(
{
fieldLabel: 'Product Desc',
name: 'pdesc'
});

var invType = new Ext.form.TextField(
{
fieldLabel: 'Inventory Type',
name: 'invType'
});

var owner = new Ext.form.TextField(
{
fieldLabel: 'Owner',
name: 'owner'
});

var eolData =
[
[1, 'all'],
[2, 'yes'],
[3, 'no']
];
var eolStoreData = new Ext.data.SimpleStore(
{
fields : ['id', 'eol'],
data : eolData
});
var eolcb = new Ext.form.ComboBox(
{
fieldLabel : 'EOL',
store : eolStoreData,
displayField:'eol',
emptyText :'All',
selectOnFocus:true
});
var fieldset1 =
{
xtype : 'fieldset',
flex : 1,
border : false,
frame : false,
defaultType : 'field',
defaults :
{
anchor : '-10',
allowBlank : false
},
items : [labDeviceField , BuFieldDevice , AisleFieldDevice, AisleLocFieldDevice ]
}

var fieldset2 =
{
xtype : 'fieldset',
flex : 1,
border : false,
frame : false,
defaultType : 'field',
defaults :
{
anchor : '-10',
allowBlank : false
},
items : [ipAddr, pid, pdesc]
}
var fieldset3 =
{
xtype : 'fieldset',
flex : 1,
border : false,
frame : false,
defaultType : 'field',
defaults :
{
anchor : '-10',
allowBlank : false
},
items : [serialNo, devStatus, invType]
}
var fieldset4 =
{
xtype : 'fieldset',
border : false,
defaultType : 'field',
defaults :
{
anchor : '-10',
allowBlank : false
},
items : [owner, eolcb]
}
var fieldsetContainerInv =
{
xtype : 'container',
layout : 'hbox',
layoutConfig :
{
align : 'stretch'
},
items : [fieldset1, fieldset2, fieldset3, fieldset4]
}

var invSearchPan = new Ext.form.FormPanel(
{
title : 'Inventory Search Query',
id : 'invSearchPan',
renderTo : Ext.getBody(),
padding : 5,
border : false,
labelAlign : 'left',
border : true,
frame : false,
height : 200,
collapsible : true,
items : fieldsetContainerInv,
buttons :
[
{
text : 'Save',
descriptionText : 'click here to save search',
handler : function()
{
popupSaveWindow();
}
}

]
});

var querySaveWindow = Ext.create('Ext.window.Window',
{
title: 'Edit Search',
width: 900,
minWidth: 600,
minHeight: 500,
layout: 'fit',
plain: true,
items: invSearchPan
});
querySaveWindow.show();
}

mitchellsimoens
23 Nov 2011, 6:55 AM
Can I get a simplified test case? One that will only show the error? Also something that can be locally run and not using Ajax to fetch data.

renganathan
23 Nov 2011, 7:21 AM
Hi ,

i am rendering grid with ajax data . its working on firefox .

but showing error in IE 8

Message: 'locked' is null or not an object
Line: 15
Char: 166181
Code: 0