## Function(event, treeId, treeNode, isCancel)setting.callback.onRename

### Overview[ depends on jquery.ztree.exedit js ]

Callback for remove node.

1. If you set 'setting.callback.beforeRename',and return false, zTree will keep the editing name, and will not trigger the 'onRename' callback.

2. If you modify treeNode data, and use 'updateNode' function, zTree will not trigger the 'onRename' callback.

3. From v3.5.13, zTree will trigger this callback when user cancel edit name. please see 'isCancel' parameter.

Default: null

### Function Parameter Descriptions

#### eventjs event Object

event Object

#### treeIdString

zTree unique identifier: treeId.

#### treeNodeJSON

JSON data object of the node which was rename.

#### isCancelBoolean

the status about cancel edit name (v3.5.13+)

isCancel = true means: user cancel edit name. (press ESC or use cancelEditName() function)

isCancel = false means: user submit edit name.

### Examples of setting & function

#### 1. When rename node, alert info about 'tId' and 'name'.

    function myOnRename(event, treeId, treeNode, isCancel) {
    	alert(treeNode.tId + ", " + treeNode.name);
    }
    var setting = {
    	callback: {
    		onRename: myOnRename
    	}
    };
    ......