1. #141
    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 ZooKeeper View Post
    There's a parentesis missing on the line
    if(o.options.isJSON || (this.reCtypeJSON && this.reCtypeJSON.test( headerObj['Content-Type'] || "" ) )){
    Fixed in trunk (bad paste )
    "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. #142
    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


    Doug, you are a hero

    The module manager.load works like a charm!

    I will post a demo soon, KRavEN and I have thought of a real nice way to dynamically load new xtype-definitions, by extending the ComponentMgr.create method.

    with the synchronize load-calls we can make with your module manager we can request the js-file on demand if the xtype isn't known yet :O

    for the people who haven't figured out how to do so. a small example:

    Code:
    App.CodeLoader = new Ext.ux.ModuleManager({modulePath: baseUrl });
    
    App.CodeLoader.load( {async:false, method:'SCRIPT'}, '/js/' + modulename + '/listAjaxGridPanelJs.pjs');
    (similar examples can also be found in the basex-source)
    Leon

  3. #143
    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


    Good to hear you guys are making progress.

    Here is a fragment of what JIT adds for what you are attempting:

    Code:
    Ext.require({method:'GET'}, 'widget-core',function(success){
           if(success){
            var mgr = Ext.ComponentMgr;
    
            mgr.create = mgr.create.createInterceptor(function(config, defaultType){
                       var require;
                       if(require = config.require){
                           var o = {async:false},
                               setAsynch =  function(rm){
                                   return typeof rm === 'object' ? Ext.apply({},o,rm):
                                     typeof rm ==='function' ? rm : {module:rm,async:false};
                               };
    
                           if(Ext.isArray( require) ){
                               require =  require.map( setAsynch );
                           } else {
                               require = setAsynch(require);
                           }
    
                           Ext.require.apply(Ext,[].concat(require) );
    
                       }
                     });
          }
        });
    Which permits:
    Code:
    container.add({
       xtype:'panel',
       require: ['tabs','grid','gmaps'],
       items: [.....] ,
     .....
     });
    Slow down guys, you're stealin' my thunder.
    "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. #144
    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


    Thunder and lightning are in the air!

    I've adjusted the Ext.ComponentMgr.create method to make it request new scripts at the server if it detects the to be instantiated xtype is unknown. That is whay I call Lazy Loading

    A demo can be found here:
    http://tejohnston.dynora.eu/ (admin admin)

    all grid-panels and form-panels you see are being requested with the Ext.ux.ModuleManager.load method (at the moment with a GET request, so not injecting the scripts into the header) when a xtype is being instantiated but not known yet.

    It even works when you first need to login before you have enough credentials to retrieve the script! After login the request is being repeated automatically to show you the correct panels. (This is where the GET probably is an advantage above injecting scripts, since with injecting you would need to replace the result you got when you didn't had enough credentials, which now is solved automatically).

    The only problem with GET is debugging is a little harder.

    for Doug! for his great work! and help!

    A small example of what now is possible:
    Code:
          var editWindow = new Ext.Window({
            items : [
                {
                    xtype : ('Edit' + this.relatedModuleName + 'FormPanel').toLowerCase()
                }
            ]
          });
          editWindow.show();
    I don't need to load a script which defines this formpanel, it is being generated by my Symfony sfExtjsThemePlugin and automatically requested upon first use by my create.createInterceptor from the server!
    Last edited by lvanderree; 19 Jul 2008 at 9:39 AM. Reason: added small example
    Leon

  5. #145
    Ext JS Premium Member
    Join Date
    May 2008
    Posts
    528
    Vote Rating
    0
    Eric24 is on a distinguished road

      0  

    Default


    @Doug: Is there a way to configure a queue to only handle one request at a time (even if there are other "slots" available)? In other words, a queue so configured would still be processed at its priority level, but only allow one outstanding request at a time, with any other requests in that queue just waiting until the outstanding request was complete.

  6. #146
    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 Eric24 View Post
    @Doug: Is there a way to configure a queue to only handle one request at a time (even if there are other "slots" available)? In other words, a queue so configured would still be processed at its priority level, but only allow one outstanding request at a time, with any other requests in that queue just waiting until the outstanding request was complete.
    @Eric24 -- What you are asking for is 'sequential optimism', not queuing. See if this asynch pattern fits your needs (it won't begin the next until the previous has completed).
    "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.


  7. #147
    Ext JS Premium Member
    Join Date
    May 2008
    Posts
    528
    Vote Rating
    0
    Eric24 is on a distinguished road

      0  

    Default


    @Doug: The 'sequential optimism' (what a strange term) pattern is well understood, but I was hoping to do something like this within the context of the basex queues (so I don't have to manage these requests externally). Essentially, I want to take advantage of the queuing but either allow for a config option that puts a queue into "one at a time" mode (at which point I could trigger the next request--somehow?--in the success handler) or better yet, a "sequential" mode that does this under the covers. Whether each individual request succeeds or fails would still be handled in the respective success/failure handler, the only difference is that a queue in "sequential" mode would hold all but one of its requests (no different than if the max outstanding request limit had been reached). By integrating this with basex queues, you then have the option of controlling the request priority both by queue priority and by "sequential/parallel" mode.

    Of course, whether you decide to do this or not is entirely up to you (I'm not quite advanced enough in ExtJS just yet to feel like I could make this mod in a reasonable period of time), but I'm curious to know if you see this as a useful addition?

    Thanks
    Eric

  8. #148
    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 Eric24 View Post
    .... Essentially, I want to take advantage of the queuing but either allow for a config option that puts a queue into "one at a time" mode (at which point I could trigger the next request--somehow?--in the success handler) or better yet, a "sequential" mode that does this under the covers. Whether each individual request succeeds or fails would still be handled in the respective success/failure handler, the only difference is that a queue in "sequential" mode would hold all but one of its requests (no different than if the max outstanding request limit had been reached). By integrating this with basex queues, you then have the option of controlling the request priority both by queue priority and by "sequential/parallel" mode.
    @Eric24 -- I believe a combination of the current progressive (one-at-a-time) queue mode and a single event listener, is all you'll need. Here is an example of how you would create that behavior with a series of queued requests:
    PHP Code:
    var Ext.lib.Ajax;
    var 
    QM A.queueManager;
    var 
    Q=QM.createQueue({name:'chained'priority3progressive:truesuspended:true }); //one-at-a-time mode

    A.on('request', function(methoduricbdataoptions){
       var 
    Q=options.queue;
       if(
    && Q.name == 'chained')Q.suspend(); //suspend the queue again until current completes
    });

    var 
    add = function(){
      
    Ext.Ajax.request({
        
    url:url,
        
    queueQ.name ,  
        
    success: function(response){
           var 
    options response.options;
           if(
    options.queue){
               
    options.queue.resume(); //re-enable for next request
               
    QM.start();
           }
           
    //do your thing
        
    },
        
    failure : function( ) {  same thing or dump the entire queue ???   },
       ....
      });
    };

    //fill the Queue with 10 requests
    for(var i=0,i<10,i++)add();

    Q.resume();
    QM.start();   //get things started 
    I hesitate to introduce internal functionality (as you describe) that might be based on success/failure. IMHO: Each implementation has specific needs in those scenarios and I don't think a sensible series of 'config options' could handle every use-case.

    Queue behavior options and EventListeners, as shown above, offer tremendous flexibility for your own way of doing things.

    Give that a try.
    "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. #149
    Ext User
    Join Date
    Feb 2008
    Posts
    49
    Vote Rating
    0
    ClemsonJeeper is on a distinguished road

      0  

    Default


    I keep getting very sporatic errors of:

    Ext.lib.Ajax.on is not a function

    Noted in Firefox with Firebug.

    I'm guessing this is because Ext.lib.Ajax has not fully loaded by the time I start using it?

    However I am loading ext-all.js and ext-basex-min.js before I use any of if. (They are in the header).

    Is there some synchronization issue or something? Does Ext.lib.Ajax need to be inside or outside of an Ext.onReady() {}?

    thanks...

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


    @ClemsonJeeper -- I suspect you may not have it (basex) loaded in the proper order, or you may not be waiting until onReady to do "something". Can you post your <head> section and describe in more detail what you are attempting when things go nuts?
    "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

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar