我有一个表格,如下所示
this.stdForm = new Ext.form.Panel(this.createStdForm());
this.stdForm.getForm().load({
params: { action: 'load', id: 1234, dep: 'std' },
success: this.formLoaded,
scope: this
});
createStdForm: function () {
var flds = {
items: [
{ fieldLabel: 'Roll Number', name: 'ROLL_NUMBER', xtype: 'displayfield' } }
]
};
var fldSet = {
title: 'Student Information',
xtype: 'panel',
defaultType: 'fieldset',
defaults: { autoHeight: true, baseCls: 'x-fieldset-noborder', reference:'RollNumber'},
items: [flds]
};
return {
layout: 'column',
border: false,
defaults: {
border: false
},
url: this.getUrl(),
items: [
col1
]
};
}在formloaded函数上,我正在尝试获取卷数字段的引用
formLoaded:function (form, action) {
form.getreferences('RollNumber') // not working
form.lookupreference(); // not working
}有人能告诉我我哪里做错了吗?
发布于 2016-07-07 18:21:25
在您的示例中-只需将referenceHolder: true添加到面板:
如果为
true,则此容器将被标记为层次结构中的一个点,其中将保存对具有指定引用配置的项的引用。如果指定了控制器,容器将自动成为referenceHolder。有关引用和引用持有者的更多信息,请参阅Ext.container.Container的介绍性文档。
https://stackoverflow.com/questions/38241585
复制相似问题