EasyUI Forum

General Category => Bug Report => Topic started by: mzeddd on January 30, 2013, 06:17:39 AM



Title: combotree :'loadData' and 'reload' functions do not work
Post by: mzeddd on January 30, 2013, 06:17:39 AM
Can anybody try 'loadData' and 'reload' functions for combotree?

When I create combotree with url like this I have no problem

Code:
$('mycc').combotree({
    url:'getData.php?id=1';
})

but when I try to update it with new url/data it fails with the following message in Firefox:

TypeError: $.data(...) is undefined        jquery.eas....js:10630

This problem is valid for the following code:

Code:
$.post('getData.php?id=1'),
    function(data){
        $('mycc').combotree('loadData',jQuery.parseJSON(data));
    }
);


TypeError: $.data(...) is undefined        jquery.eas....js:10637

This problem is valid for the following code:

Code:
$('mycc').combotree('reload','getData.php?id=1');


Title: Re: combotree :'loadData' and 'reload' functions do not work
Post by: stworthy on January 30, 2013, 11:57:05 PM
Please refer to http://jsfiddle.net/kwV9G/. It seems the 'loadData' method works fine.


Title: Re: combotree :'loadData' and 'reload' functions do not work
Post by: mzeddd on January 31, 2013, 01:55:24 AM
In this example you are not using data from outside. In my case I'm getting data string from getData.php script.
Possible jQuery.parseJSON(data) do not convert string to tree object properly.