我是extjs 4.0的新手,并尝试制作包含列表和表单的hbox布局,但表单显示不正确,只有标签可见,但文本字段不可见,请纠正代码
Ext.define("Screener.view.PharmacyView", {
extend: 'Ext.Container',
requires : [ 'Screener.view.Pharmacyform' ],
xtype: 'pharmacylist',
config: {
fullscreen: true,
layout: 'hbox',
title: 'Patient Assignments',
items: [
//our patient list is built on the Patients store, and has a title and sort button
{
xtype: 'list',
id: 'patientList',
itemTpl: '{lastname}, {firstname}',
store: Ext.create('Screener.store.Patients',{
storeId: 'patientStore'
}),
items:[{
xtype: 'titlebar',
docked: 'top',
title: 'Patients',
items:[{
xtype: 'button',
text: 'Sort',
id: 'sortButton',
align: 'left'
}]
}],
flex:1,
},
{xtype : 'pharmacyform',
flex:2
}
]
}
});
,表格如下
Ext.define(“Screener.view.Pharmacyform”,{
xtype:'pharmacyform', extend: 'Ext.form.Panel', config:{ items: [ { xtype: 'textfield', name : 'name', label: 'Name', placeholder: 'nametext' }, ]} });
答案 0 :(得分:0)
您需要使用别名配置来声明您自己的xtypes我相信,试试这个
Ext.define("Screener.view.Pharmacyform", {
extend: 'Ext.form.Panel',
alias:'widget.pharmacyform',