Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/ios/115.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Extjs 如何复制Ext obj并显示为HTML_Extjs - Fatal编程技术网

Extjs 如何复制Ext obj并显示为HTML

Extjs 如何复制Ext obj并显示为HTML,extjs,Extjs,我想在一个新的模式窗口中显示一个带有标签和值的Ext表单。我希望表单是只读的,这样用户就可以打印出窗口。我可以访问表单并显示模式窗口,但我似乎无法在模式窗口中显示表单,因为它是一个对象 这是我单击按钮时出现的窗口: var printWindow = Ext.create("Ext.Window", { renderTo: Ext.getBody(), title: 'Print Window', cls: 'print', scr

我想在一个新的模式窗口中显示一个带有标签和值的Ext表单。我希望表单是只读的,这样用户就可以打印出窗口。我可以访问表单并显示模式窗口,但我似乎无法在模式窗口中显示表单,因为它是一个对象

这是我单击按钮时出现的窗口:

var printWindow = Ext.create("Ext.Window", {
        renderTo: Ext.getBody(),
        title: 'Print Window',
        cls: 'print',
        scrollable: true,
        closable: false,
        maximized: false,
        modal: false,
        moveable: false,
        items: [{
            xtype: 'panel',
            html: mySample,
            height: 400,
            width:300
        }],
        dockedItems: [{
                xtype: 'toolbar',
                dock: 'bottom',
                align: 'right',
                layout: 'hbox',
                items: [{
                    xtype: 'component',
                    flex: 1
                },{
                    xtype: 'button',
                    align: 'right',
                    text: 'Print This Window'
                }]
            }],
        tools: [{
            type: 'close',
            handler: function() {
                printWindow.close();
                htmlBody.removeCls('no-print');
                htmlBody.disabled = false;
            }
        },{
            type: 'print',
            tooltip:        'some tooltip info',
            handler: function() {
                print();
            }
        }]
    });
    printWindow.show();
注意-新面板中的HTML配置选项不正确,我使用它进行测试