Search code examples
htmlextjswindow

How to update extjs4 window's html text on condition


i am working in extjs4. i have window as=

addComment : function(btn) {
        var me = this;
        var reviewWindow = Ext.create('Ext.window.Window', {
            bodyPadding: '0 0 0 15px',
            cls: 'requestWindowCls',
            style: {
                borderColor: 'white'
            },
            width: 575,
            header : true,
            id: 'addcomment',
            buttonAlign: 'right',
            html : 'Add Comment',...

i want to update window's html on condition and want to place that html in header as title which will consist of text along with some icon. So how to perform this in extjs4


Solution

  • For updating window content you can use reviewWindow.update('HTML content');

    For updating window's header content you can use reviewWindow.getHeader().update('HTML content');