[Users] Using ext-basex with GeoExt

Andreas Hocevar ahocevar at opengeo.org
Wed Aug 25 22:55:51 CEST 2010


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