1. #101
    Sencha - Community Support Team hendricd's Avatar
    Join Date
    Aug 2007
    Location
    Long Island, NY USA
    Posts
    5,962
    Vote Rating
    10
    hendricd will become famous soon enough hendricd will become famous soon enough

      0  

    Default


    Quote Originally Posted by wm003 View Post

    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..)
    To clarify:
    PHP Code:
    if((options.queue || (options.queue Ext.lib.Ajax.queueAll))  && !options.queued){ 
    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{}).

    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.


  2. #102

  3. #103
    Sencha - Community Support Team hendricd's Avatar
    Join Date
    Aug 2007
    Location
    Long Island, NY USA
    Posts
    5,962
    Vote Rating
    10
    hendricd will become famous soon enough hendricd will become famous soon enough

      0  

    Default


    Quote Originally Posted by wm003 View Post
    Ah, i understand now. Thanks. Are you going to implement this into the final 3.0 of basex?
    You'll see it in beta2.
    "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.


  4. #104
    Ext User
    Join Date
    Jun 2008
    Location
    SF Bay Area,CA
    Posts
    40
    Vote Rating
    0
    coderobo is on a distinguished road

      0  

    Default Redirect (302) handler never gets called

    Redirect (302) handler never gets called


    I setup a redirect handler using -

    Code:
      
    
    function redirectHandler(conn, response, options ) {
      debugger;
    }
    ...
    Ext.lib.Ajax.on('status:302', redirectHandler, this);
    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.

    I can see the above behavior using FF LiveHeaders add-on as well as using the std Ext Ajax event handler -

    Code:
    Ext.Ajax.on(
        'requestcomplete' , redirectHandler 
       );
    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.

    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:


    Code:
    function mkHttpProxy(tableid) {
     return new Ext.data.HttpProxy({
          url: 'itables/'+tableid+'-json.jsp'
     });
    
    var store = new Ext.data.Store({
        proxy: mkHttpProxy(tableid),
        ....
    Regards

  5. #105
    Sencha - Community Support Team hendricd's Avatar
    Join Date
    Aug 2007
    Location
    Long Island, NY USA
    Posts
    5,962
    Vote Rating
    10
    hendricd will become famous soon enough hendricd will become famous soon enough

      0  

    Default


    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.


  6. #106
    Ext User
    Join Date
    Jun 2008
    Location
    SF Bay Area,CA
    Posts
    40
    Vote Rating
    0
    coderobo is on a distinguished road

      0  

    Default


    Quote Originally Posted by hendricd View Post
    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.
    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

  7. #107
    Sencha - Community Support Team hendricd's Avatar
    Join Date
    Aug 2007
    Location
    Long Island, NY USA
    Posts
    5,962
    Vote Rating
    10
    hendricd will become famous soon enough hendricd will become famous soon enough

      0  

    Question


    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.


  8. #108
    Ext User
    Join Date
    Jun 2008
    Location
    SF Bay Area,CA
    Posts
    40
    Vote Rating
    0
    coderobo is on a distinguished road

      0  

    Default


    Quote Originally Posted by hendricd View Post
    Wonder if you could set a header in the login POST and have the serverside avoid the redirect if it's present.
    Yeah I am writing a Java Servlet filter that will trap the redirect and convert it into a 401 if it sees the XHR header in a POST.

  9. #109
    Sencha - Community Support Team hendricd's Avatar
    Join Date
    Aug 2007
    Location
    Long Island, NY USA
    Posts
    5,962
    Vote Rating
    10
    hendricd will become famous soon enough hendricd will become famous soon enough

      0  

    Default 3.0 beta 2 is Up !

    3.0 beta 2 is Up !


    See, this for latest changes.
    "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. #110
    Ext JS Premium Member
    Join Date
    May 2008
    Posts
    528
    Vote Rating
    0
    Eric24 is on a distinguished road

      0  

    Default


    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!

Thread Participants: 82

  1. galdaka (1 Post)
  2. Digital God (3 Posts)
  3. prophet (1 Post)
  4. alayasf (2 Posts)
  5. tof (1 Post)
  6. stever (3 Posts)
  7. mystix (4 Posts)
  8. fangzhouxing (6 Posts)
  9. ludoo (1 Post)
  10. KRavEN (4 Posts)
  11. DigitalSkyline (3 Posts)
  12. daemach (1 Post)
  13. violinista (1 Post)
  14. mlarese (1 Post)
  15. walker_cn (4 Posts)
  16. stevebla (4 Posts)
  17. Chris in Cambridge (1 Post)
  18. mjlecomte (2 Posts)
  19. ZooKeeper (10 Posts)
  20. brookd (1 Post)
  21. fermo111 (6 Posts)
  22. kevinwu8 (1 Post)
  23. Spirit (3 Posts)
  24. jerrybrown5 (4 Posts)
  25. lvanderree (8 Posts)
  26. Makor (4 Posts)
  27. yanick (1 Post)
  28. wm003 (10 Posts)
  29. radio1 (3 Posts)
  30. jphillips (2 Posts)
  31. markpele (2 Posts)
  32. Romantik (1 Post)
  33. Sander_S (4 Posts)
  34. maximumcoder (2 Posts)
  35. NotChris (6 Posts)
  36. ritchrs (2 Posts)
  37. sksoft (2 Posts)
  38. jvanantwerp (2 Posts)
  39. jfa (2 Posts)
  40. BlueCamel (1 Post)
  41. ClemsonJeeper (3 Posts)
  42. sp797 (1 Post)
  43. mahesh122 (2 Posts)
  44. zombeerose (12 Posts)
  45. jlowe (2 Posts)
  46. bt_bruno (2 Posts)
  47. pompom (4 Posts)
  48. Eric24 (18 Posts)
  49. baumschule (3 Posts)
  50. coderobo (3 Posts)
  51. krause (1 Post)
  52. mubenchi (1 Post)
  53. mrkadakia (3 Posts)
  54. tomim (4 Posts)
  55. canxss (2 Posts)
  56. tasman (3 Posts)
  57. mrsunshine (4 Posts)
  58. Trinad (2 Posts)
  59. jasonb885 (2 Posts)
  60. wki01 (5 Posts)
  61. mschwartz (2 Posts)
  62. sarathy (2 Posts)
  63. jdurante (1 Post)
  64. TomChiverton (1 Post)
  65. sumit.madan (2 Posts)
  66. Riemi (4 Posts)
  67. Henrik Rutzou (3 Posts)
  68. hairinwind (1 Post)
  69. gzlizp (1 Post)
  70. yuanqixun (2 Posts)
  71. larryaubstore (2 Posts)
  72. wupeng (2 Posts)
  73. blueram (1 Post)
  74. ronivcp (1 Post)
  75. t00bs (2 Posts)
  76. hyponym (4 Posts)
  77. mg2468 (3 Posts)
  78. scaddenp (1 Post)
  79. faith wins (3 Posts)
  80. aratcliffe (8 Posts)
  81. jhashe (3 Posts)
  82. jaufgang (1 Post)

Tags for this Thread