0
我想用extjs 3.4创建一个表格,顶部有一个字段,中间是pdf。 显示PDF是没有问题的,带有字段的表单是没有问题的。将两者放在一起并没有奏效。 显示pdf与面板一起工作,带有字段的窗体是Ext.form.FormPanel。 如何在表单中嵌入pdf? 这里是我的尝试:在extjs 3.4中显示一个PDF格式的表格
var pdfForm = new Ext.form.FormPanel({
id: 'pdfForm'
,width: 700
,cloasable: false
,waitMsgTarget: true
,items: [{
region: 'north',
autoHeight: true,
layout: 'column',
border: false,
defaults: {
bodyStyle: 'padding:10px'
},
items: [{
columnWidth: 0.5,
layout: 'form',
border: false,
items: [{
xtype: 'textfield',
fieldLabel: 'Z',
id: 'Z',
name: 'Z',
readOnly: true,
anchor: '95%'
}, {
xtype: 'textfield',
fieldLabel: 'X',
name: 'X',
readOnly: true,
anchor: '95%'
}]
}, {
columnWidth: 0.5,
layout: 'form',
border: false,
items: [{
xtype: 'textfield',
fieldLabel: 'Y',
name: 'y',
readOnly: true,
anchor: '95%'
}, {
xtype: 'textfield',
fieldLabel: 'M',
name: 'M',
readOnly: true,
anchor: '95%'
}]
}]
},{
region: 'center',
xtype: 'tabpanel',
id: 'tabs',
plain: true,
activeTab: 4,
activeItem: 4,
layoutOnTabChange: true,
defaults: {
bodyStyle: 'padding:0px'
},
deferredRender: false,
},{
region: 'south',
xtype: 'tabpanel',
items:[{
xtype: 'box',
autoEl: {
tag: 'iframe',
id: 'samplePDF',
name: 'samplePDF',
style: 'height: 100%; width: 100%',
src: 'http://'+serverIP+'/documents/18/bc1bca0a-d437-4505-aee4-9cbe63553a6d'
}
}]
}]
});
决定性的代码是在最后几行。 “autoel”与Ext.form.FormPanel不匹配。 有没有其他的选择?