EasyUI Forum

General Category => Bug Report => Topic started by: zzdfc on March 17, 2014, 08:51:56 PM



Title: Node is null in onCheck event of tree when tree page is opened in window.showMod
Post by: zzdfc on March 17, 2014, 08:51:56 PM
Hi:

Node is null in onCheck event of tree when tree page is opened in window.showModalDialog.

almost every event parameter "node" of tree is null when tree page is opened in window.showModalDialog.

(IE)


Title: Re: Node is null in onCheck event of tree when tree page is opened in window.showMod
Post by: stworthy on March 17, 2014, 11:34:01 PM
How do you use the 'onCheck' event? Please provide an example to demonstrate your issue.


Title: Re: Node is null in onCheck event of tree when tree page is opened in window.showMod
Post by: zzdfc on March 18, 2014, 12:24:11 AM
var treeOpts = {
        'checkbox': true,
        'cascadeCheck': false,
        'onClick': tree1_click,
        'onCheck': tree1_check,
        'onBeforeLoad': tree1_beforeLoad
    };
    $('#tree1').tree(treeOpts);
    var root = $('#tree1').tree('getRoot');
    $('#tree1').tree('expand', root.target);



function tree1_check(node, checked)
{
    if (node)// node is null
{
        AddRow(node, checked);
    }
    
}
function tree1_beforeLoad(node, param)
{
    var strUrl = "/Sys/User/GetUsers/" + teid;
    if (node)
    {
        param.tiid = node.id;    }
    $('#tree1').tree("options").url = strUrl;
}



Title: Re: Node is null in onCheck event of tree when tree page is opened in window.showMod
Post by: stworthy on March 18, 2014, 01:10:48 AM
Please try the attached file 'test.html'. It works fine.