Extjs3 在extjs中获取项目的方法?
如何从表单中获取项目 资料来源:Extjs3 在extjs中获取项目的方法?,extjs3,Extjs3,如何从表单中获取项目 资料来源: Application.TypesForm = Ext.extend(Ext.form.FormPanel, { initComponent : function() { Ext.apply(this, { ... items : [ { xtype : 'VerticalsComboBox',
Application.TypesForm = Ext.extend(Ext.form.FormPanel, {
initComponent : function() {
Ext.apply(this, {
...
items : [
{
xtype : 'VerticalsComboBox',
}
...
在垂直组合框中,ajax请求填充一个组合框,他的名字=vert\u id。
我需要显示vert_id的值。
这样做:
form = Ext.getCmp('TypesForm');
alert(form.getForm().findField('status').getValue());
但是不工作,我做错了什么?如果你想找到一个字段“vert_id”,为什么要通过“status”?Evan Trimboli,我还没有输入form和status。我尝试了警报(form.getForm().FindField('vert_id').GetValue());-显示错误form.getForm不是一个函数(如图所示)
var form=new Application.TypesForm();警报(form.getForm().findField('vert_id').getValue())代码>以及如何为组合框赋值var form=new Application.TypesForm();form.getForm().findField('vert_id').setValue(Ext.getCmp('ComboBoxForTypes').getValue())代码>但没有工作,对吗?