[Users] Using ext-basex with GeoExt
Adam Ratcliffe
adam at prema.co.nz
Thu Aug 26 05:14:13 CEST 2010
Hi Andreas,
That works brilliantly thank you! I was unaware of the
Ext.util.Observeable.observeClass() method, it's very useful.
Cheers
Adam
On Thu, Aug 26, 2010 at 8:55 AM, Andreas Hocevar <ahocevar at opengeo.org> wrote:
> Hi,
>
> you can use a global beforerequest handler instead of the override, like this:
>
> Ext.util.Observable.observeClass(Ext.data.Connection);
> Ext.data.Connection.on({
> "beforerequest": function(conn, options) {
> var url = options.url;
> if (OpenLayers.ProxyHost && OpenLayers.String.startsWith(url, "http") {
> var parts = url.replace(/&$/, "").split("?");
> var params = Ext.apply(parts[1] && Ext.urlDecode(
> parts[1]) || {}, options.params);
> var url = Ext.urlAppend(parts[0], Ext.urlEncode(params));
> delete options.params;
> options.url = OpenLayers.ProxyHost + encodeURIComponent(url);
> }
> }
> });
>
> Regards,
> Andreas.
>
> On Aug 25, 2010, at 22:39 , Adam Ratcliffe wrote:
>
>> Hi,
>>
>> I added the ext-basex library into my application so I could use the $JIT code-on-demand features. As I'm already using the GeoExt Ajax overrides, $JIT, which requires modifications to Ext.Ajax to function correctly, fails.
>>
>> I'm wondering if anybody has modified Ext.Ajax so that it can use OpenLayers.ProxyHost without requiring proxying Ext.Ajax requests through OpenLayers.Request?
>>
>> Cheers
>> Adam
>> _______________________________________________
>> Users mailing list
>> Users at geoext.org
>> http://www.geoext.org/cgi-bin/mailman/listinfo/users
>
>
>
> --
> Andreas Hocevar
> OpenGeo - http://opengeo.org/
> Expert service straight from the developers.
>
>
More information about the Users
mailing list