本文主要是介绍Ext文档里的按钮总结,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
1.表单提示:
var F_XXX= form.getForm().findField("F_XXX");if(F_XXX.xtype!=null){F_XXX.emptyText = 'XXX'; F_XXX.setRawValue(F_XXX.emptyText); F_XXX.show();
}
2.文档按钮获取字段数据:
function(){var doc = this.document;var id = this.document.items.get(0).items.get(0).getForm().findField('ID').value;var XXX = this.document.items.get(0).items.get(0).getForm().findField('F_XXX').value;//已有数据var XXX = this.document.items.get(0).items.get(0).getForm().findField('F_XXX').getRawValue();// var XXX = this.document.items.get(0).items.get(0).getForm().findField('F_XXX').getValue();//新填写的数据 或者var form = this.document.items.items[0].items.items[0].getForm();var pdfField1 = form.findField('XXX');
}
3.文档提示消息、关闭、刷新:
MixkyApp.showInfoMessage(r.message);var doc = this.document;
MixkyApp.desktop.closeDocument(doc.documentkey,doc.documentid);
Ext.getCmp(doc.getOpenerId()).refresh();
4.文档保存:
function() {this.document.submitDocument();
}
5.文档提交修改自动内容:
function(){var XXX= this.document.items.get(0).items.get(0).getForm().findField('XXX');XXX.setValue(2);this.document.confirmDocument(); //提交并关闭
}
6.文档标签页提交按钮:
function(){panel.submit();
}
7.自定义表单配置:
8.嵌套调用direct
BrandDirect.isExistBrandNameWithUpdate(F_NAME.getValue(),F_NAME_EN.getValue(),F_REPORT_TEMP_ID,ID,function(r,e) { if(r.success) { MixkyApp.showInfoMessage(r.message);if(F_PARENT_ID_NEW!=''){BrandDirect.updateParentChildList(ID,F_PARENT_ID_NEW,function(r1,e) { if(r1.success) { MixkyApp.showInfoMessage(r1.message);doc.confirmDocument(); } });}else{doc.confirmDocument(); }} else { MixkyApp.showInfoMessage(r.message); } });
这篇关于Ext文档里的按钮总结的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!