-
4 Jun 2009 12:29 PM #1
[2.x, 3.x] ext-basex/JIT 4.1 Adapter extensions
[2.x, 3.x] ext-basex/JIT 4.1 Adapter extensions
The ext-basex adapter has been re-adapted for use with Ext 3.0 and adds the following new features:
- Adds Browser 'capabilities' object reporting on presence of (SVG, Canvas, Flash, Cookies, XPath ) (eg:- Adds Ext.overload supported for parameter-based overloading of Functions and class methods.Code:if(Ext.capabilities.hasFlash){ ... }
- Adds Ext.clone functions for any datatype.
- Adds Array prototype features: first, last, clone, forEach, atRandom, include, flatten, compact, unique, filter, map.
- Connection/response object members : getAllResponseHeaders, getResponseHeader are now functions.
- Adds Array.slice shortcut support for other browsers (Gecko already supports it)- Adds Ext[isFunction, isObject, isDocument, isElement, isEvent] methods.Code:Array.slice( arguments, 2 )
- Adds Ext.isEventSupported('resize'[, forElement]) to determine if the browser supports a specific event.
- Adds cross-browser multiPart Response handling (via onpart callbacks and/or the new parts Array of response Object)
See online Multipart Demo here.
- Adds parsed contentType to all response objects
- Adds Xdomain request support for modern browsers (IE8, etc) To make a cross-domain request simply add xdomain:true to any Ext.Ajax.request.ext-basex has been repackaged to make it lighter-weight. The ux.ModuleManager class has been moved the $JIT package (included), so if you are using the ModuleManager you'll need to include both ext-basex.js and jit.js in your project.HTML Code:Note: servers must implement the header: 'Access-Control-Allow-Origin: [*|domain.com]' for a response to be processed.
I'll also announce that my official ux demonstration site is up, and based entirely on $JIT / Ext.3.0.
Demonstrations:
JSONP -> Flickr with ext-basex.
Multipart Reponses (lately dubbed MXHR) with ext-basex.
For more about $JIT, see the documentation link and aquick Tutorial is also available here. More coming..
ZIP Download Note: the current vBulletin config gzips attachments which IE hates. Download this with Firefox (or other browser) instead of IE.Last edited by hendricd; 23 Nov 2009 at 1:54 PM. Reason: Release 4.1
"be dom-ready..."
Doug Hendricks
Maintaining ux: ManagedIFrame, MIF2 (FAQ, Wiki), ux.Media/Flash, AudioEvents, ux.Chart[Fusion,OFC,amChart], ext-basex.js/$JIT, Documentation Site.
Got Sencha licensing questions? Find out more here.
-
5 Jun 2009 1:15 AM #2
-
5 Jun 2009 12:54 PM #3
Grats Doug!

_____________________________________________
For ExtJS Consultation and Custom Development ->
Contact Paul[at]digitalskyline.com
-
8 Jun 2009 12:21 AM #4
found a tiny issue with the primary clone function -- it currently does an isFunction() check before an emptiness check. if the obj is null, the clone() method chokes, splutters sputters and dies.
a simple swap does the trick:
Code:var clone = function(obj, deep) { if (!obj) {return obj;} if (Ext.isFunction(obj.clone)) { return obj.clone(deep); } // if (!obj) {return obj;} var o = {}; forEach(obj, function(val, name, objAll) { o[name] = (val === objAll ? // reference to itself? o : deep ? clone(val, true) : val); }); return o; };Last edited by mystix; 8 Jun 2009 at 7:20 AM. Reason: welcome to the wonderful world of pre-dinner typos =)
Sencha Docs / Ext 3.x - ( Docs | Examples )
Learning Center / Saki's Examples (for 2.x) / HOWTO - ( Report Bugs | Post Proper Code )
-
8 Jun 2009 5:31 AM #5
@mystix -- Thanks. Fixed in SVN.
"be dom-ready..."
Doug Hendricks
Maintaining ux: ManagedIFrame, MIF2 (FAQ, Wiki), ux.Media/Flash, AudioEvents, ux.Chart[Fusion,OFC,amChart], ext-basex.js/$JIT, Documentation Site.
Got Sencha licensing questions? Find out more here.
-
10 Jun 2009 7:31 AM #6
I have a web-page page1 and I'm navigating to page2.
If I'm sending a synchronous call in unload event handler
will the synchronous call arrive the server before the request to page2?
How will asynchronous request behave?
Thank you.
-
10 Jun 2009 7:36 AM #7
"be dom-ready..."
Doug Hendricks
Maintaining ux: ManagedIFrame, MIF2 (FAQ, Wiki), ux.Media/Flash, AudioEvents, ux.Chart[Fusion,OFC,amChart], ext-basex.js/$JIT, Documentation Site.
Got Sencha licensing questions? Find out more here.
-
10 Jun 2009 9:01 AM #8
the sync request does get handled by the server. On my server log I can see that the sync request is received only after the next page request.
What I'm trying to do is to tell the server to change the session state before the iframe navigation occurs. With beforeunload on IE and FF it works great but apparently unload event won't help.
-
10 Jun 2009 9:07 AM #9
"be dom-ready..."
Doug Hendricks
Maintaining ux: ManagedIFrame, MIF2 (FAQ, Wiki), ux.Media/Flash, AudioEvents, ux.Chart[Fusion,OFC,amChart], ext-basex.js/$JIT, Documentation Site.
Got Sencha licensing questions? Find out more here.
-
10 Jun 2009 9:23 AM #10
The code is in the parent page.
I didn't try to send the sync ajax request from the child frame. I'll try it now.
I'm using standard js to simplify it before using ext and basex
Code:<iframe id="childF" src="page1.html"></iframe> var childF = document.getElementById('childF').contentWindow; childF.addEventListener('unload', function(){ if (window.XMLHttpRequest) { AJAX=new XMLHttpRequest(); } else { AJAX=new ActiveXObject("Microsoft.XMLHTTP"); } if (AJAX) { AJAX.open("GET", '/test/', false); AJAX.send(null); //return AJAX.responseText; //alert(AJAX.responseText); } else { //return false; //alert('false'); } }, false);





Reply With Quote
