自己循环setValue("")了一遍,getForm().getEl().dom.reset();所有数据清空了下,发现效果并不是很好,清除数据是清除了,但是,所有的水印提示连带清除掉了
handler : function(){ //调用新增方法
editWindow.setTitle("新增系统菜单");
editForm.getForm().reset();
editWindow.restore();
editWindow.show();
}
明明重置了表单,为什么还是有缓存数据啊,弄了半天,发现是顺序错误!!!
show显示窗口要写在Formpanel加载当前Record之前,不然editForm.getForm().reset();无效,之前缓存的record会清除不掉
data['father_num'] = node.attributes.father_name;
dataMap['data']=data;
editWindow.show(); //写在loadRecord之前!!
editForm.getForm().loadRecord(dataMap);
editWindow.restore();
再次测试,成功了.....