When I download the extension from the extension page I get the error that the archive is corrupt. (I tried it using tar/gzip on ubuntu and WinRAR on windows.
To make it simple, just add an actionTree1() to your working controller and add a views/your-controller-view-folder/tree1.php file, which is explained in the documentation Case 1: using HTML.
If you want to display a hierarchical database table, you need the nestedset extension.
Read the nestedset documentation carefully, and set up your database then follow my documentation Case 2: using database table.
To use jsTree v.0.9.9a you need to modify CjsTree::init() method, this is my version:
public function init()
{
if(isset($this->htmlOptions['id']))
$id=$this->htmlOptions['id'];
else
$id=$this->htmlOptions['id']=$this->getId();
if($this->url!==null)
$this->url=CHtml::normalizeUrl($this->url);
$dir = dirname(__FILE__).DIRECTORY_SEPARATOR.'source';
$this->baseUrl = Yii::app()->getAssetManager()->publish($dir);
$cs=Yii::app()->getClientScript();
//$cs->registerScriptFile($this->baseUrl.'/jquery.tree.js');
$cs->registerScriptFile($this->baseUrl.'/jquery.tree.min.js');
// jstree should make this automatically (see line 211),
// but this does not work if script is loaded
// dynamically with renderPartial into jQuery/UI dialog
if (!isset($this->options['ui'])) $this->options['ui'] = array();
if (!isset($this->options['ui']['theme_name'])) $this->options['ui']['theme_name'] = 'default';
if (!isset($this->options['ui']['theme_path'])) $this->options['ui']['theme_path'] =
$this->baseUrl.'/themes/'.$this->options['ui']['theme_name'].'/style.css';
$options=$this->getClientOptions();
$options=$options===array()?'{}' : CJavaScript::encode($options);
$cs->registerScript('Yii.CJsTree#'.$id,"$(function () { $(\"#{$id}\").tree($options); });");
if($this->cssFile !== null && $this->cssFile !== false)
$cs->registerCssFile($this->cssFile);
}
Set it up and the big trouble began. The main problem is that when i try to use variable TREE_OBJ in the callbacks ( either in alert or try to use it’s method ) nothing happens. After debugging with firebug i see that the TREE_OBJ has value false instead of object params.
Finally, is this extension left to it’s faith? Will there be any more contribute to it?
Even if anchor tag has an url like "test_10/index.php", onClicking on that anchor text it is not going to the specified URL, please tell me how can I make this work
it didnt worked with me =/ when i try to use the code example of the program it shows {"type":"json","async":true,"opts":{"method":"GET","async":true,"url":"http:\/\/www.jstree.com\/demos\/async_json_data.json"}}