[code]
/**
* 该表单提供对各个元素回车验证并且自定切换到下一个元素功能
*/
Ext.define("Ext.ux.form.Panel",{
extend:"Ext.form.Panel",
isValid:function(){
var isValid = true;
Ext.Array.each(this.items.items,function(item,index){
if(!item.isValid()){
isValid = false;
item.focus();
return false;
}
});
return isValid;
},
initComponent:function(){
var me = this;
var specialKey = function(field,e,eOpts){
if (e.getKey() == Ext.EventObject.ENTER) {
var isValid = true;
if(!field.isValid()){
field.focus();
}else{
if(me.isValid()) {
me.getFo