{
            text: "保存(S)",
            id: "save_jydedit",
            minWidth: 70,
            handler: function() {
                jyd_edit_save();
            }
        }function jyd_edit_save() {
        if (EditPublishForm.getForm().isValid()) {//主表
            EditPublishForm.form.submit({ url: "URL/jydbh/savejydinfo_jydedit.aspx", method: "POST" });
            var modified = ds.modified;
            jydeditchild_save(modified)//从表
        }
    }
    function jydeditchild_save(modified) {
        var json = [];
        Ext.each(modified, function(item) {
            json.push(item.data);
        });
        if (json.length > 0) {
            Ext.Ajax.request({
                url: "URL/jydbh/savejydinfo_hwdedit.aspx",
                params: { data: Ext.util.JSON.encode(json), jydbh: Ext.getCmp("jydbh").getValue() },
                method: "POST",
                success: function(response) {
                    Ext.getCmp("save_jydedit").disable(); Ext.getCmp("save_jydedit").setText("更新(S)"); EditPublishForm.disable(); 
                    Ext.getCmp("edit_jydedit").enable(); Ext.getCmp("printpre_jydedit").enable(); Ext.getCmp("print_jydedit").enable();
                },
                failure: function(response) {
                    Ext.Msg.alert("警告", "数据保存失败,请稍后再试!");
                }
            });
        }
        else {
        }
    }
怎么有时候可以保存 有时候主表 老是获取不到数据提示"未将对象引用设置到对象的实例"