Gelmiş geçmiş en büyük porno sitemiz olan 2pe de her zaman en kaliteli pornoları sunmayı hedefledik. Diğer video sitemiz olan vuam da ise hd porno ağırlıklı çalışmalara başladık.

  1. #1
    Ext JS Premium Member
    Join Date
    Sep 2011
    Posts
    62
    Vote Rating
    0
    ExtJSNinjas is on a distinguished road

      0  

    Default Worked in 4.0.7, not in 4.2 - Overwriting panel body prevents adding items

    Worked in 4.0.7, not in 4.2 - Overwriting panel body prevents adding items


    Hello,

    In ExtJS 4.2, after overwriting the body of a panel, the add method no longer works. This did work in ExtJS 4.0.7 and first overwrote the body of the panel, and then added the new component into the DOM. The strange thing is that calling add creates the right HTML and has the correct references set - ownerCt is set on the child component, and the child component is included in the parent's item array - but the HTML is not updated correctly.

    This did work in ExtJS 4.0.7 and would first overwrite the body of the component, and then would add a sibling to the new body content. Unfortunately one of our custom controls relies heavily on this.

    Here's a simple example that you can use to see the difference between the latest ExtJS 4.2 version and 4.0.7.

    Code:
    <html><head>
    <link rel="stylesheet" type="text/css" href="ext-4.2.0.663/resources/css/ext-all.css" />
    <script type="text/javascript" src="ext-4.2.0.663/ext-all-debug.js"></script> 
    <!--
    <link rel="stylesheet" type="text/css" href="ext-4.0.7/resources/css/ext-all.css" />
    <script type="text/javascript" src="ext-4.0.7/ext-all-debug.js"></script> -->
    <style>
    #agear {
        left: 0 !important;
    }
    #asave {
        left: 17px !important;
    }
    </style>
    <script>
        Ext.onReady(function() {
                var viewport = new Ext.container.Viewport({
                    height: '100%'
                });
                
                var panel = new Ext.panel.Panel({
                    header: false,
                    height: 300
                });
                
                panel.on('afterrender', function(){            
                    Ext.DomHelper.overwrite(panel.body, '<p>hello</p>');
                });
                
                viewport.add(panel);
                                        
                var button = new Ext.button.Button({
                    text: 'a button'
                });
    
    
                panel.add(button);
                
                // Button's ownerCt reference is to panel, but looking at panel's dom, button is nowhere to be found now.
                // If you switch to ExtJS 4.0.7, you will see the button render and inspecting the dom will show that it is present alongside the applied template.
                
        });
    
    
    </script>
    </head>
    <body>
        
    </body>
    </html>
    Anyone have any ideas? Rewriting this all would be a huge undertaking

  2. #2
    Sencha - Ext JS Dev Team evant's Avatar
    Join Date
    Apr 2007
    Location
    Sydney, Australia
    Posts
    16,603
    Vote Rating
    580
    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


    You shouldn't be overwriting elements on the panel directly, you need to be using the API:

    Code:
    panel.update('Foo');
    Evan Trimboli
    Sencha Developer
    Twitter - @evantrimboli
    Don't be afraid of the source code!

  3. #3
    Ext JS Premium Member
    Join Date
    Sep 2011
    Posts
    62
    Vote Rating
    0
    ExtJSNinjas is on a distinguished road

      0  

    Default


    Thank you! That worked great. Much appreciated.

  4. #4
    Sencha User
    Join Date
    Aug 2012
    Posts
    1
    Vote Rating
    0
    magesh007 is on a distinguished road

      0  

    Default How to replace ext js componets in panel

    How to replace ext js componets in panel


    panel.update() just replaces the text but when i pass any component object to this update it not replacing the panel content

Thread Participants: 2