1. #111
    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


    The current default for 3.0 is 10. That seems to be a good common denom for today's modern browsers.
    "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. #112
    Ext User lvanderree's Avatar
    Join Date
    Sep 2007
    Location
    The Netherlands
    Posts
    181
    Vote Rating
    0
    lvanderree is on a distinguished road

      0  

    Default Great Work!

    Great Work!


    Hi Doug,

    thanks for this great work!
    I am using it in the symfony-extjs-theme-plugin (if that is OK with you). Together with the work of KRavEN I now can intercept if my session has been timed-out (401) so I can offer the opportunity to re-login and automatically re-request the latest action!

    For a demo: http://tejohnston.dynora.eu/ (login: admin:admin) open a new window and logout via: http://tejohnston.dynora.eu/logout and now try to refresh the grid (or sort a column to get a better idea of the result).

    I was wondering if it is also possible to implement (async.) lazy-loading of javascript and inject those includes in the header of your html, together with callback methodes? As the "using" script is doing as well.
    The using script is working fine for me to accomplish this, but I cannot intercept 401-headers with it when a person has been timed-out. That is why I want to combine it with your script, but maybe you have/had got some ideas for this as well?
    Leon

  3. #113
    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 lvanderree View Post
    ....I was wondering if it is also possible to implement (async.) lazy-loading of javascript and inject those includes in the header of your html, together with callback methodes? As the "using" script is doing as well.
    The using script is working fine for me to accomplish this, but I cannot intercept 401-headers with it when a person has been timed-out. That is why I want to combine it with your script, but maybe you have/had got some ideas for this as well?
    Wow. You're loading lots of externals, huh?

    In order to trap HTTP status for resource requests like yours, you need to stick with straight Ajax requests (as <script> tags don't provide the necessary status reporting you would need for session timouts/re-authentication). Marrying "using" with basex will not work as "using" is unaware of the additional event plumbing/request queuing that basex provides. You would need one or the other but, not both.

    The 3.0 basex package (containing ux.ModuleManager 1.0) has everything you'll likely need to do all that. To create your own equivalent of "using++", using basex, consider something like this:

    PHP Code:
    (function(){

        var 
    =  new Ext.ux.ModuleManager({
            
    disableCaching   false,
            
    method           App.debug "DOM" /*<script> tags */"GET" /* or POST -- pure Ajax */,
            
    styleAdjust      : {pattern:/url\(\s*\.\.\//ig, replacement:'url(../../resources/'}
         
    });
       
       var 
    delegate L.load.createDelegate;

        
    Ext.applywindow, {   //adjust to suit your dialect
         
    $iNeed                 delegate(L) ,

         
    $iNeedLatest         delegate(L, [{disableCaching  true}], 0) ,

         
    $iProvide              L.provides.createDelegate(L),

         
    $iNeedBlocking       delegate(L, [{async:false}], 0),

         
    $iNeedNoRealHurry  delegate(L, [{async:truequeue:'slow'priority9}], 0),

         
    $iNeedForFrame     delegate(L, [{method'DOM'targetsomeFrame.window }], 0),

         
    $iNeedForMIF     delegate(L, [{ targetsomeMIF }], 0),

         
    $iNeedCSS        :  delegate(L, [{method'DOM'}], 0),

         
    $iNeedCSSForSwapping    :  delegate(L, [
                      { 
    method:'GET',
                         
    listeners:{
                             
    load :function(ModManmoduleresponsecontent){
                                     
    ModMan.applyStyle(modulemodule.content content);
                             }
                          }                    
                      } ], 
    0)
       });
    })(); 
    Wire up that, with this and this, and you've got a complete solution (a subset of what the upcoming Ext.JIT is designed to do).
    PHP Code:
    $iNeed('packages/tinyMCE',function(success){
      if(
    success){  doStuffwithtinyMCE(); }
     }); 
    Tweak it.
    Last edited by hendricd; 29 Jun 2008 at 10:05 AM. Reason: some abbrevs and frame support
    "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. #114
    Ext User lvanderree's Avatar
    Join Date
    Sep 2007
    Location
    The Netherlands
    Posts
    181
    Vote Rating
    0
    lvanderree is on a distinguished road

      0  

    Default


    Thanks for the fast response.

    Yep, I indeed have a lot of includes. Almost every panel has its own file, since I am generating these with my generator. I only have to set some config-files and together with the datamodel this results in these panels. Fortunately KRavEN is working on a combiner to reduce the number of files for production versions to only one, and so the latency to get the panels loaded. (this will also remove my need for lazy-loading, but maybe it will be nice for other people and in development-environments).

    I already was thinking of changing one or the other (preferably loose "using" and using basex only (with the ModuleManager)) to get this done. With this info I think I should be able to get some further. At the moment however I am very busy with getting a demo version of my graduation project ready for Wednesday, so till then I won't be working on it.

    I'll come back to you whenever I have made some progress on it.
    Leon

  5. #115
    Sencha User
    Join Date
    Oct 2007
    Location
    Berlin, Germany
    Posts
    889
    Vote Rating
    9
    wm003 will become famous soon enough

      0  

    Default


    Another Suggestion:
    a config item for each ajax.request that will trigger cancelling currently running request with a lower priority than the new requesting one.
    Something like

    PHP Code:
            Ext.Ajax.request({
                
    url'importantrequest.php',

                
    successajax_success,
                
    failureajax_failure,
                
    queue: {
                    
    name 'veryimportant',
                    
    priority1,
                    
    freeSlottrue //this will trigger basex to cancel a running request with a prio 2-9
                
    }

            }); 

  6. #116
    Sencha User bt_bruno's Avatar
    Join Date
    Mar 2008
    Location
    Redwood City, CA
    Posts
    154
    Vote Rating
    10
    bt_bruno will become famous soon enough

      0  

    Smile


    @hendricd
    It seems to be awesome to load js files dinamic. Ext.ux.ModuleManager is excellent. Congratulations. I'm writting a 'one-page-only' app and this is very usefull.

    BTW, can I load .js files using autoLoad att from tabPanel? If no, it would be just what is missing.

    Cheers!

  7. #117
    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


    Quote Originally Posted by bt_bruno View Post
    BTW, can I load .js files using autoLoad att from tabPanel? If no, it would be just what is missing.
    Ext.Panel::autoLoad can already load <script>s and markup. Not sure what you mean I guess.
    "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. #118
    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 ext-basex 3.0 Final is posted.

    ext-basex 3.0 Final is posted.


    Thanks for all the feedback.

    I'll begin documenting more here as time permits.
    "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.


  9. #119
    Ext User
    Join Date
    Dec 2007
    Location
    Ukraine
    Posts
    50
    Vote Rating
    0
    Romantik is on a distinguished road

      0  

    Default


    Hi all and hendricd
    big thanks for plugin - it's good one for developer
    Explain me simple situation and tell me please where I'm not correct?
    I'm using your example adviframes and see something strange
    I've replaced in the code of the tree
    defaultSrc : 'http://www.google.com/'
    to
    defaultSrc : 'test.php'

    test.php
    PHP Code:
    <?php
    echo time();
    ?>
    when I click on this node I see current timestamp (e.g. 1215465924)
    then after each action (click again on this node, reload, refresh) I don't see current time - only past time (1215465924)
    So when I refresh via browser I see changed time =(

    how to fix it?

    thanks.

  10. #120
    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


    I think you've posted this in the wrong thread, but I suspect your browser is using a cached response.

    Either set appropriate cache-control headers in your PHP response, or mangle the URL to prevent browser caching:

    Code:
    MIFP.setSrc('test.php?bustCache='+new Date().getTime() );
    "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.


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