Ext之from表单操作

来源:互联网 发布:慧商软件 编辑:程序博客网 时间:2024/06/15 02:02

1.from表单赋值

var customerItem = Ext.create('Lube.model.customer.CustomerInfoDetailModel',data);var form = customerinfoorgdetailview.down('form');form.loadRecord(customerItem);
2.获取from表单所有数据

button.up('form').getValues();
3.from表单验证

readOnly:true,editable:false,allowBlank:falseform.isValid()

4.from动态级联

{xtype : 'combo',fieldLabel : '子类别',editable : false,labelWidth : 60,columnWidth : .33,labelAlign : 'right',name :'type1',displayField : 'itemName',valueField : 'itemCode',store : Ext.create('Lube.store.system.DictionaryItemStore',{dictionaryCode : dictionarycode_customerType,pItemCode : null}),listeners : {change: function (combo, newValue, oldValue, eOpts) {if(newValue!=null){var type2 =  combo.ownerCt.down('[name=type3]');type2.setValue('');type2.getStore().pItemCode = newValue;type2.getStore().load();}}}},{xtype : 'combo',fieldLabel : '子子类别',editable : false,labelWidth : 60,labelAlign : 'right',columnWidth : .33,name :'type2',displayField : 'itemName',valueField : 'itemCode',store : Ext.create('Lube.store.system.DictionaryItemStore',{dictionaryCode : dictionarycode_customerType,pItemCode : null})}




0 0
原创粉丝点击