Array(String) / Function(treeId, treeNode)setting.async.autoParam

Overview[ depends on jquery.ztree.core js ]

During asynchronous loading, a request is sent to the server, which contains the identify of the parent node, so it can retrieve the children. This attribute is an array of strings, which is the identity parameter (or parameters). It applies when [setting.async.enable = true]

Default:[ ]

Array(String) Format

1. Put the attribute name(s) of node to the array. For example: ["id", "name"]

2. You can rename the parameter name as sent to the server. For example: server only accepts "zId" -- ["id=zId"]

Function Parameter Descriptions

treeIdString

zTree unique identifier: treeId.

treeNodeJSON

Parent node's JSON data object

When asynchronously loading the root, the treeNode = null

Return Array(String)

Return value is same as 'Array(String) Format'

Examples of setting

1. set auto commit 'id' attribute

var setting = {
	async: {
		enable: true,
		url: "http://host/getNode.php",
		autoParam: ["id"]
	}
};
If we have a parent node: {id:1, name:"test"}, When we are asynchronously loading this parent node's children, it will be submitted to the server with parameters: id=1
......

2. set auto commit 'id' attribute, but the parameter name expected by the server is 'zId'

var setting = {
	async: {
		enable: true,
		url: "http://host/getNode.php",
		autoParam: ["id=zId"]
	}
};
If we have a parent node: {id:1, name:"test"}, When we are asynchronously loading this parent node's children, it will be submitted to the server with parameters: zId=1
......