View Full Version : ComboBox issue getting error getPositionEl() is undefined

1 Jun 2011, 8:18 AM
I am having issue with combobox. It is present within a formpanel and this formpanel is an item inside the center panel of ViewPort. When I click on the Combo, it is not populating any data but I am getting an error that getPositionEl() is null or not an object in IE and getPositionEl() is undefined in FF. I had the same combo inside the formpanel ( within a window instead of VP), it was working fine. There is another combobox in the paging toolbar for a grid within the same formpanel, even that has the same error. Tried various ways, but doesnt work. What am i doing wrong? Please help....
Below is the combo code:



var statusStrId = 'statusStrId';

//Do not recreate the store if it already exists.
var statusStr = Ext.StoreMgr.lookup (statusStrId);
if ((statusStr != null) && (statusStr !== undefined)) {
return statusStr;

var recordLayout = [
{name: 'statusId', mapping: 'statusId', type: 'int' },
{name: 'statusName', mapping: 'statusName',type: 'string'}
var dataMapping = Ext.data.Record.create(recordLayout);
var url = 'getAllStatus.do';

statusStr = new Ext.data.Store({
storeId: statusStrId,
//autoLoad: true,


proxy: new Ext.data.HttpProxy({
url: url,
disableCaching: true,
async: false
reader: new Ext.data.JsonReader({
root: 'statusData',
totalProperty: 'totalNumberOfRows',
id: 'statusId'
// listeners: {
// loadexception: function(proxy, store, response, e) {
// handleJsonLoadException(response, e);
); //end data store initialization
return statusStr;



searchStatusCombo = new Ext.form.ComboBox({

store: getStatusStoreDisp(),
id: 'searchStatus',
name: 'searchStatus',
fieldLabel: 'Status',
mode: 'local',
displayField: 'statusName',
valueField: 'statusId',
//hiddenName: 'statusCode',


triggerAction: 'all',
lazyInit: false,
//width: 200,


emptyText:'Select a Status',
shadow: false


Below is the Form Panel Column where the Combo is included:

// right column
// defaults:{anchor:'75%'},
//fieldLabel: 'Status',

And here is the Center portion of the Viewport where the Form Panel is an item:



//,width: 750



1 Jun 2011, 1:25 PM
Any feedback on this issue?

1 Jun 2011, 7:14 PM
Use Firebug or similar to figure out where in the ExtJS source this error is being thrown. Both ColumnLayout and TriggerField use getPositionEl() so it could be either of them.

2 Jun 2011, 5:27 AM
Thanks for your reply. I tried removing TriggerAction:all , still getting the same error. I looked at firebug and the error is thrown at ext-all.js

b.getPositionEl() is undefined
var swfobject=function(){var E="undefi...);Ext.grid.GroupingView.GROUP_ID=1000; (http://www.sencha.com/forum/"{href}"','tpl)Line 11

Any suggestion on what I could be doing wrong? I am using extjs 3.3
I have combobox in few other formpanels as a columnlayout, it works fine there. I am not sure why only this particular one is not working.

2 Jun 2011, 6:05 AM
I figured out the problem. The issue is with adding the FormPanel as an item into viewport. Instead just add the formpanel(containing the combobox) by using .add and then doLayout() on the viewport.

2 Jun 2011, 6:35 AM
For future reference, when digging into issues with Firebug you need to use ext-all-debug.js rather than ext-all.js. The debug version will give a useful line number as it hasn't been minified.