我正在尝试将 sencha touch 应用程序从 1.1 版重写到 2 版。
在 st 1.1 中,我以这种方式循环遍历表单域:
this.fields.each(function(field) {
// Code here
}, this);
在 st 2 中,this.fields 为空。还有另一种方法可以在表单面板中获取字段列表吗?
提前致谢
最佳答案
你可以试试这个
var fields = this.getFieldsArray();
Ext.each(fields, function (field) {
// code here
}, this);
或
this.getFieldsAsArray().forEach(function(field) {
// code here
});
关于forms - 遍历 Sencha Touch 2 中的表单域,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9639094/