View Full Version : "communication failure" from data.store using httpproxy

4 Jun 2007, 11:04 AM
ive been banging my head on the wall with this problem

trying to get a json object back into a store with this code:


formDef= [
{name: 'fieldLabel'},
{name: 'name'},
{name: 'value'},
{name: 'allowBlank'},
{name: 'width'},
{name: 'validationType'},
{name: 'fieldType'}

ds = new Ext.data.Store({
proxy: new Ext.data.HttpProxy({ url: 'testData.js' }),
reader: new Ext.data.JsonReader({
root: 'testData',
totalProperty: 'totalCount',
id: 'testid'
formDef ),
remoteSort: true



and this is what is passed in:

{totalCount: 1,
testData: [
{ fieldLabel: "First Name", name: "FirstName", value: "ian" , allowBlank: false, width: 175 , validationType: false, fieldType: "TextField"}

but when i look at the error generated, it tells me "communication failure"
ive tried wrapping keys and values in quotes, and pretty much everything i can think of.

any ideas?

thanks in advance.

4 Jun 2007, 11:19 AM
That would seem to be a problem with the server responding - maybe b/c it's not sending the correct content-type for a js file? Try setting BPs in Yahoo.Connect to get a better idea of the actual error code from the server or check server logs to see if its sending an error code.

4 Jun 2007, 11:45 AM
actually, im just testing from my local machine. could this make a difference?

4 Jun 2007, 11:49 AM
If you are not using a web server then yes. HttpProxy uses an HTTP request....