PDA

View Full Version : Connection problem with ScriptTagProxy !



casbar
19 Aug 2009, 7:05 AM
Hello,
I have a little problem with a ScriptTagProxy extending class which I found on the Internet...

I always get

uncaught exception: Ext.data.DataProxy: DataProxy attempted to execute an API-action but found an undefined url / function. Please review your Proxy url/api-configuration.

I dont understand whats wrong in this code...
Any Idea?

Code:


Ext.namespace('Flickr');

/*
Utility class for connecting to Flickr
*/
Flickr.FlickrProxy = Ext.extend(Ext.data.ScriptTagProxy,
{
url: 'http://api.flickr.com/services/rest/',
method: null,
apiKey: null,
callbackParam: 'jsoncallback',

constructor: function(config)
{
Flickr.FlickrProxy.superclass.constructor.call(this, config);
this.on('beforeload', this.onBeforeLoad, this);
},

onBeforeLoad: function(o, params)
{
Ext.apply(params,
{
format: 'json',
api_key: this.apiKey,
method: 'flickr.' + this.method
}
);
return true;
}
}
);

casbar
19 Aug 2009, 8:15 AM
nobody any idea?