1. #1
    Sencha User Daniil's Avatar
    Join Date
    Jun 2010
    Location
    Saint-Petersburg, Russia
    Posts
    974
    Vote Rating
    110
    Daniil is a name known to all Daniil is a name known to all Daniil is a name known to all Daniil is a name known to all Daniil is a name known to all Daniil is a name known to all

      0  

    Default [4.2.0 beta 2] ComponentLoader: should not disableCaching be overridden?

    [4.2.0 beta 2] ComponentLoader: should not disableCaching be overridden?


    REQUIRED INFORMATION

    Ext version tested:
    • Ext 4.2.0 beta 2
    Browser versions tested against:
    • Chrome
    DOCTYPE tested against:
    • <!DOCTYPE html>
    Description:
    • I see ComponentLoader inherits an ElementLoader's disableCaching. This destination "Appends current timestamp to script files to prevent caching." of the disableCaching option seems not be actual for a ComponentLoader. But should not it be overridden to pass it as an option of an AJAX request?
    • Setting up a disableCaching option in an ajaxOptions works.
    Steps to reproduce the problem:
    • Just run the sample
    The result that was expected:
    • No "?_dc=..." in the URL
    The result that occurs instead:
    • There is "?_dc=..." in the URL regardless the "disableCaching: false" setting.
    Test Case:
    Code:
    <!DOCTYPE html>
    <html>
    <head>
        <title>Loader disableCaching</title>
    
        <link rel="stylesheet" href="../resources/css/ext-all.css" />
        
        <script src="../ext-all-debug.js"></script>
    
        <script>
            Ext.onReady(function () {
                Ext.create('Ext.panel.Panel', {
                    renderTo: Ext.getBody(),
                    loader: {                    
                        url: '/Test/GetItems',
                        renderer: 'component',
                        disableCaching: false,
                        autoLoad: true
                    }
                });
            });
        </script>
    </head>
    <body>
    
    </body>
    </html>
    Ext.NET - ASP.NET for Ext JS
    MVC and WebForms
    Examples | Twitter

  2. #2
    Sencha - Ext JS Dev Team evant's Avatar
    Join Date
    Apr 2007
    Location
    Sydney, Australia
    Posts
    16,953
    Vote Rating
    636
    evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute

      0  

    Default


    Not totally sure what you're saying, disableCaching isn't an option on ElementLoader or ComponentLoader. Are you suggesting that it be added so you don't need to specify ajaxOptions?
    Evan Trimboli
    Sencha Developer
    Twitter - @evantrimboli
    Don't be afraid of the source code!

  3. #3
    Sencha User Daniil's Avatar
    Join Date
    Jun 2010
    Location
    Saint-Petersburg, Russia
    Posts
    974
    Vote Rating
    110
    Daniil is a name known to all Daniil is a name known to all Daniil is a name known to all Daniil is a name known to all Daniil is a name known to all Daniil is a name known to all

      0  

    Default


    Thank you for the answer.

    Seems, I posted in rush. I looked at the singleton Ext.Loader and was sure this option is available for ElementLoader as well.

    So, it is rather my mistake. I think "ajaxOptions" is good enough. Maybe, a separate option would be useful, but I am not sure.

    Please close the thread if you wish.

    P.S. Could you take a look at this one? Just it is already answered and I am afraid it can escape of your attention. Thank you.
    http://www.sencha.com/forum/showthread.php?255370
    Ext.NET - ASP.NET for Ext JS
    MVC and WebForms
    Examples | Twitter

Thread Participants: 1