-
21 Jun 2008 5:50 AM #101
To clarify:
This asserts request.options.queue first (from a higher level component like TreeLoader), else (||) assert options.queue to lib.Ajax default (false, true, or Qconfig{}).PHP Code:if((options.queue || (options.queue = Ext.lib.Ajax.queueAll)) && !options.queued){
Of course you could still provide a queue configs on either TreeLoader or the Grid's Proxy as well."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.
-
21 Jun 2008 6:36 AM #102
Ah, i understand now. Thanks. Are you going to implement this into the final 3.0 of basex?Extensions:
Ext.ux.DatePickerPlus (Multimonth,Multiselect,...)
Ext.ux.menu.StoreMenu - Ajax Store as menu-item config
Extended Window - Aero Shadows, nested grayscaled modal windows
Ext.MessageBox.promptCombo/promptRadio/promptCheckbox
Ext.ux.plugin.triggerfieldTooltip (for Comboboxes, Datefields...)
Ext.util.MD5
Ext.util.Utf8 (encode/decode)
Ext.util.base64 (encode/decode)
Using:
ExtJS 3.4.1.1/4.2
XPsp3/W7sp1
IE8/9/10
FF 20
Chrome 26
-
22 Jun 2008 3:59 AM #103"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.
-
24 Jun 2008 10:02 AM #104
Redirect (302) handler never gets called
Redirect (302) handler never gets called
I setup a redirect handler using -
However when a JSON store load causes the server to return a 302, the redirectHandler never gets a chance to intercept the call. The browser (FF2) seems to preempt it by following the redirect, fetching the redirected page (login page) and stuffing the final 200 OK login response page to the JSON store loader.Code:function redirectHandler(conn, response, options ) { debugger; } ... Ext.lib.Ajax.on('status:302', redirectHandler, this);
I can see the above behavior using FF LiveHeaders add-on as well as using the std Ext Ajax event handler -
The requestcomplete handler only gets to fire after the browser has followed the 302 and got to the final page with a status of 200.Code:Ext.Ajax.on( 'requestcomplete' , redirectHandler );
So the question that comes to the surface - Is this a bug in the ext-basex (I have tried 2.3 and 3.0 beta1) or the basex library can't trap 302 by virtue of any design limitations ?
The JSON store uses an HttpProxy w/o instantiating a new Connection object to allow it to get to the Singleton Ajax object:
RegardsCode:function mkHttpProxy(tableid) { return new Ext.data.HttpProxy({ url: 'itables/'+tableid+'-json.jsp' }); var store = new Ext.data.Store({ proxy: mkHttpProxy(tableid), ....
-
24 Jun 2008 10:07 AM #105
Yes, 302 will generally be handled by the browser for you, so you'll have rather limited success with that.
If the session has indeed expired, your server should respond with 40x status, and then you can handle recovery/login screen client-side in a controlled fashion."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.
-
24 Jun 2008 10:36 AM #106
Thanks Hendicd - The 40X are trapped so they are fine. Its the initial login that is triggered via a 302 that is the root of the problem. I am using a J2EE app server that uses the standard form-auth mechanism via a 302 redirect to login page. I don't have control over it. I suppose some messy server side programming could be used to trap the redirects and turn them into a 401 or an appropriate JSON response.
The more I use ext and Ext ux I realize it represents a paradigm shift from the Web 1.0 world. Perhaps these pitfalls should be mentioned in a FAQ.
Thanks
-
24 Jun 2008 10:40 AM #107
Wonder if you could set a header in the login POST and have the serverside avoid the redirect if it's present.
"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.
-
24 Jun 2008 12:32 PM #108
-
27 Jun 2008 7:28 AM #109
3.0 beta 2 is Up !
"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.
-
27 Jun 2008 8:24 AM #110
Doug,
What should I know about the simultaneous requests limit? Your defaults are 2 for IE and 4 for FF. What's behind that? Are there any guidelines or hard limits regarding this?
Thanks!






mmh, what if treepanel or gridpanel are calling ajax.request then? options.queue will be false they are going not to be queued.. (or maybe i do not correly understand the if statement here..
)
Reply With Quote