Page 34 of 42 FirstFirst ... 243233343536 ... LastLast
Results 331 to 340 of 414

Thread: [ext-basex/$JIT 4.0 adapter extensions] Ajax enhancements and more.

  1. #331

    Question Does this still work ?

    Given the following to invoke a JSON-returning page (Ext 3):
    Code:
     var response = Ext.Ajax.request({
                url:'/extDirect/isTimeBetween.cfm',
                method:'GET',
                async: false,
                params: {clientCode: cli.getValue(),matterCode: mat.getValue(),
                         startDate:start.getValue(),endDate:end.getValue()
                        } ,
                disableCaching : true  //Just to be explicit
            });
    I get an error with basex v2.3 (about this.headers being undefined), and neither v3.52 or 4 seem to but the response text into the result.

    Edit: The fix is here: http://www.extjs.com/forum/showthrea...937#post386937 maybe the start of this thread needs updating along with http://www.extjs.com/forum/showthrea...313#post192313 ?

  2. #332
    Touch Premium Member
    Join Date
    Feb 2008
    Posts
    206

    Default

    DOH! this should have been posted to the 3.0.x extensions thread. Will repost where it belongs.

    I'm testing the latest ext-basex from SVN trunk against extjs 3.1pre.

    I noticed that if I specified Ext.lib.Ajax.maxConcurrentRequests = 2 that I would actually see three outstanding requests run at once in firebug. Looking at the dispatch function it seems like the comparison should be >= instead of just > ?

    Code:
            dispatch   : function(){
                var qm = this, qmq = qm.queues;
                var quit=(A.activeRequests > A.maxConcurrentRequests);
                while(A.pendingRequests && !quit){
    
                   var disp = function(qName) {
                        var q = qmq[qName], AR;
    
                        while (q && !q.suspended && q.pending && q.requestNext()) {
    
                            quit || (quit = A.activeRequests > A.maxConcurrentRequests);
                            if(quit)break;
    
                            // progressive, take the first one off each queue only
                            if (q.progressive || qm.progressive) { break;}
    
                         }
                         // keep going?
                         if(quit)return false;
                    };
    
                    forEach(this.priorityQueues, function(pqueue) {
                        // pqueue == array of queue names
                        !!pqueue.length && forEach(pqueue , disp, this);
                        quit || (quit = A.activeRequests > A.maxConcurrentRequests);
                        if(quit)return false;
                    }, this);
    
                }
    
                if(A.pendingRequests || quit){
                    this.dispatch.defer(this.quantas, this);
                } else{
                    this.stop();
                }
            }

  3. #333
    Sencha User sksoft's Avatar
    Join Date
    Jan 2008
    Location
    Moscow, Russia
    Posts
    34

    Exclamation BUG: isObject redefined incorrectly (Ext 3.0)

    Problem:
    toolbars in grids are disappeared

    Steps to reproduce the problem:
    include basex adapter in standart Ext 3.0 example (...ext-3/examples/grid/edit-grid.html)

    Workaround:
    comment out definition of Ext.isObject in basex.

    P.S.
    Why you redefine the following methods of Ext 3.0?
    Array.indexOf,
    Ext.isArray isObject isNumber isBoolean isFunction isString isPrimitive isDefined

    If you do it for compatibility with Ext 2.0 you can check Ext.version before.

  4. #334
    Sencha User hendricd's Avatar
    Join Date
    Aug 2007
    Location
    Long Island, NY USA
    Posts
    5,966

    Default

    @sksoft --

    Line 1661 of ext-basex.js should read:

    Code:
     Ext.applyIf(Ext, {
    It was modified for a test just a couple weeks ago, and I forgot to put it back in.

    All Array, String, etc prototypes are extended in this fashion.

    I'll update basex-SVN for this shortly.

    Sorry for the snafu.
    "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. #335
    Sencha User sksoft's Avatar
    Join Date
    Jan 2008
    Location
    Moscow, Russia
    Posts
    34

    Default shortly

    shortly?

  6. #336

    Default Bug: $JIT does not take reference that contains a .

    Problem:
    $JIT does not take reference that contains a .

    Steps to reproduce the problem:
    $JIT.depends , {
    ,'jquery.blockUI' : {path: root + ui }
    ,'jquery.progressbar' : {path: root + ui }
    ,'jquery.autocomplete' : {path: root + ui }
    ,'jquery.scrollTo-min' : {path: root + ui }


    Workaround:
    Rename the .js files.
    $JIT.depends , {
    ,'jqueryblockUI' : {path: root + ui }
    ,'jqueryprogressbar' : {path: root + ui }
    ,'jqueryautocomplete' : {path: root + ui }
    ,'jqueryscrollTo-min' : {path: root + ui }

  7. #337
    Ext JS Premium Member
    Join Date
    Mar 2009
    Location
    Boston
    Posts
    28

    Default

    Forgive me if this has been answered, as I have not read through this whole thread.

    I am trying to find a way to trap prevent client side timeouts. In searching the forum, I found http://www.extjs.com/forum/showthread.php?t=69742

    hendricd posted code that makes a timeout reset.

    Code:
    Ext.lib.Ajax.on('timeout',  //global
        function(request, callback) {
    
           if(request.tId == this.transactionId){
              alert(++this.timeouts + ' timeout(s) occurred.'); 
              return this.timeouts > 3; //false=='reset the timer' until it exceeds 3 
           }
    
        }, this);
    I have used this (changing it a little) in my project and it works to make the timeouts reset. However, once the Ajax call has completed, the callback function that I have defined does not get called.

    How can I make sure it gets called when complete?

    Thanks!!

  8. #338
    Sencha User hendricd's Avatar
    Join Date
    Aug 2007
    Location
    Long Island, NY USA
    Posts
    5,966

    Default

    @larryaubstore--

    Some recommendations:
    If you must use periods in filenames, just add the extension implicitly:
    Code:
      $JIT.depends , {
                ,'jquery.blockUI.js'               :   {path: root + ui }
                ,'jquery.progressbar.js'           :   {path: root + ui }
                ,'jquery.autocomplete.js'          :   {path: root + ui }
                ,'jquery.scrollTo-min.js'          :   {path: root + ui }
    or, No need to rename anything:
    Code:
    var jqueryPath = root + ui + 'jquery.';
    $JIT.depends , {
                ,'blockUI'               :   {path: jqueryPath }
                ,'progressbar'           :   {path: jqueryPath }
                ,'autocomplete'          :   {path: jqueryPath }
                ,'scrollTo-min'          :   {path: jqueryPath }
    "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. #339
    Sencha User hendricd's Avatar
    Join Date
    Aug 2007
    Location
    Long Island, NY USA
    Posts
    5,966

    Question

    Quote Originally Posted by jdurante View Post
    Forgive me if this has been answered, as I have not read through this whole thread.

    I am trying to find a way to trap prevent client side timeouts. In searching the forum, I found http://www.extjs.com/forum/showthread.php?t=69742

    hendricd posted code that makes a timeout reset.

    Code:
    Ext.lib.Ajax.on('timeout',  //global
        function(request, callback) {
    
           if(request.tId == this.transactionId){
              alert(++this.timeouts + ' timeout(s) occurred.'); 
              return this.timeouts > 3; //false=='reset the timer' until it exceeds 3 
           }
    
        }, this);
    I have used this (changing it a little) in my project and it works to make the timeouts reset. However, once the Ajax call has completed, the callback function that I have defined does not get called.

    How can I make sure it gets called when complete?

    Thanks!!
    @jdurante -- could you clarify a bit, You mean a retry does finally succeed, but the callback YOU defined is not called, or no success/failure callback is called?
    "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. #340

    Default

    Quote Originally Posted by hendricd View Post
    $JIT is not just for loading code. It has many (perhaps too many ) configuration options for managing resources besides executable code and CSS.

    I'm trying to load .css files:

    Ext.apply( $JIT.depends , {
    // JS source file | source location | Dependencies (in required load order)
    'uxvismode' : {path: ux }
    ,'uxmedia' : {path: ux , depends: [ '@uxvismode']}
    ,'uxflash' : {path: ux , depends: [ '@uxmedia'] }
    ,'uxchart' : {path: ux , depends: [ '@uxflash'] }
    ,'uxfusion' : {path: ux , depends: [ '@uxchart'] }
    ,'uxofc' : {path: ux , depends: [ '@uxchart'] }
    ,'uxamchart' : {path: ux , depends: [ '@uxchart'] }
    ,'uxflex' : {path: ux , depends: [ '@uxflash'] }
    ,'mif' : {path: ux , depends: [ '@uxvismode' ] }
    ,'mifmsg' : {path: ux , depends: [ '@mif'] }
    ,'mifdd' : {path: ux , depends: [ '@mif', '@TEST.CSS'] }
    ,'TEST.css' : {path: CSS }

    });

    I look into the firebug NET console and the CSS seems to load. However, the javascript execution is stopped.

    Can I do something like this ?

    I know you can apply style with this:

    $JIT.css('themes/brightblue.css', 'lightgreen.css' );
    $JIT.onAvailable('brightblue.css', function(loaded){
    loaded && $JIT.applyStyle('brightblue.css');
    });
    //Stylesheet removal:
    $JIT.removeStyle('brightblue.css');

    However, it losses a little bit the just-in-time loading. I just want to have the dependencies in one place in the code.

Page 34 of 42 FirstFirst ... 243233343536 ... LastLast

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •