PDA

View Full Version : Combobox data load hangs on subsequent calls



ogradyjd
2 Feb 2010, 10:55 AM
I've got what seems to be a very obscure problem - or I'm just missing something so huge that I can't see it from so close.

I have a combobox that is drawing data from a HttpProxy object using json. The combobox works fine in Firefox and Chrome and Opera - you hit the forward and back buttons and the results are pulled from the server with no problem. The combobox is exactly like this example:

http://www.extjs.com/deploy/dev/examples/form/forum-search.html (http://www.extjs.com/forum/../deploy/dev/examples/form/forum-search.html)

- with the exception that I still allow the drop-down arrow button. Again, this works with all browsers, except IE. Sadly, the example works just fine, which probably means I'm doing something wrong.

In IE8, right after the page has loaded for the first time, you hit the dropdown button and the combobox requests information from the server like normal. If you hit the arrow for the next page of data, however, the "Searching..." message comes up, and then hangs there. No request is sent to the server - I know this because it's a Java application and I have runtime debugging enabled and nothing hits the breakpoints in the servlet providing the json data.

Since it's IE and firebug lite just isn't really helpful in cases like this, all I've got to go on is these IE errors:



Webpage error details

User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.04506.30; .NET CLR 3.0.04506.648; InfoPath.2; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; MS-RTC LM 8)
Timestamp: Tue, 2 Feb 2010 18:48:48 UTC


Message: Object doesn't support this property or method
Line: 187
Char: 17
Code: 0
URI: http://localhost:7001/otcnet/batch/js/extjs/ext-all-debug.js


Message: Object doesn't support this property or method
Line: 187
Char: 17
Code: 0
URI: http://localhost:7001/otcnet/batch/js/extjs/ext-all-debug.js


Message: Object doesn't support this property or method
Line: 187
Char: 17
Code: 0
URI: http://localhost:7001/otcnet/batch/js/extjs/ext-all-debug.js

I looked at the code, but it doesn't tell me anything meaningful about why an http request is never made to the server only for further pages.

My setup is like so:



// Main application entry point
Ext.onReady(function() {
var ds = new Ext.data.Store({
proxy: new Ext.data.HttpProxy({
url: '<%=basePath%>data/agencysite.json'
}),
reader: new Ext.data.JsonReader({
id: 'id',
root: 'agencySites',
totalProperty: 'totalCount'
}, [
{name: 'id', type: 'int'},
{name: 'orgName'},
{name: 'orgCode'}
])
});
// Custom rendering Template
var resultTpl = new Ext.XTemplate(
'<tpl for="."><div class="x-combo-list-item">{id} - {orgName}</div></tpl>'
);
var agencySiteSelect = new Ext.form.ComboBox({
store: ds,
typeAhead: false,
triggerAction: 'all',
displayField:'id',
loadingText: 'Searching...',
forceSelection: true,
pageSize:10,
tpl: resultTpl,
minChars: 2,
emptyText:'Select an Agency Site ID...',
valueNotFoundText: 'No matching ID found...',
selectOnFocus:true,
triggerAction: 'all',
transform:'agencySiteIdSelect',
//valueField:'id',
width:200
});
Again, this works fine in every other browser, but IE is required for my current project. Can anyone spot the problem? :-/