Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ExtJS: Clear panel content before loading

Tags:

extjs

i'm trying to load some content to an existing panel with #{component}.load({url:''}); but the panel has already some content, how do i clear the panel content?

like image 948
jgemedina Avatar asked Dec 13 '25 04:12

jgemedina


1 Answers

See the panel method removeAll(...).

var panel = new Ext.Panel({
    title: 'Panel',
    id: 'panel',
    layout: 'form',
    items:
    [
        {
            xtype: 'textfield',
            fieldLabel: 'Text',
            value: 'Textfield'
        }
    ]
});

panel.removeAll(true);

Does this work for you?

like image 93
Chau Avatar answered Dec 16 '25 23:12

Chau



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!