/*
	Copyright (c) 2004-2006, The Dojo Foundation
	All Rights Reserved.

	Licensed under the Academic Free License version 2.1 or above OR the
	modified BSD license. For more information on Dojo licensing, see:

		http://dojotoolkit.org/community/licensing.shtml
*/

dojo.provide("memtext.widget.TreeLoadingControllerSx");
dojo.require("dojo.widget.TreeLoadingControllerV3");
dojo.require("dojo.widget.TreeBasicControllerV3");
dojo.require("dojo.event.*");
dojo.require("dojo.json");
dojo.require("dojo.io.*");
dojo.require("dojo.Deferred");
dojo.require("dojo.DeferredList");
dojo.declare("dojo.Error", Error, function (message, extra) {
	this.message = message;
	this.extra = extra;
	this.stack = (new Error()).stack;
});
dojo.declare("dojo.CommunicationError", dojo.Error, function () {
	this.name = "CommunicationError";
});
dojo.declare("dojo.LockedError", dojo.Error, function () {
	this.name = "LockedError";
});
dojo.declare("dojo.FormatError", dojo.Error, function () {
	this.name = "FormatError";
});
dojo.declare("dojo.RpcError", dojo.Error, function () {
	this.name = "RpcError";
});
//Ă„nderung: RpcActionParam
dojo.widget.defineWidget("memtext.widget.TreeLoadingControllerSx", dojo.widget.TreeLoadingControllerV3, 
	{RpcUrl:"", RpcActionParam:"getJSON_Kostenstelle"

, loadRemote:function (node, sync) {
	var _this = this;
	var params = {node:this.getInfo(node), tree:this.getInfo(node.tree)};
	//MB Ă„nderung node.objectId
	var deferred = this.runRpc({url:this.getRpcUrl(node.objectId), sync:sync, params:params});
	deferred.addCallback(function (res) {
		return _this.loadProcessResponse(node, res);
	});
	return deferred;
}
});