Hallo,
hab folgendes Proglem und zwar es wird die AJAX funktion nicht aufgerufen
Hab jetzt schon alles auf das minimum reduziert und finde einfach den Fehler nicht
Aufbau:
modules/merchant/KeywordController.php
modules/merchant/views/keyword/index.php
in der index.php:
<?php
$this->widget('CTreeView',array(
// 'animated'=>'fast', //quick animation
// 'collapsed' => true,
'url' => array('ajaxFillTree'),
// 'htmlOptions'=>array(
// 'class'=>'treeview-famfamfam',
// )
));
?>
im Controller:
public function actionAjaxFillTree()
{
echo 'askdjfalskdjf';
if (!Yii::app()->request->isAjaxRequest) {
echo 'blub != Ajax';
exit();
}
echo 'hmm';
if (isset($_GET['root'])){
echo '$_GET is set';
switch($_GET['root']){
case 'source':
CTreeView::saveDataAsJson(array(array('id'=>'own', 'text'=>'Your Keywords', 'hasChildren'=>'true'),
array('id'=>'All', 'text'=>'All Keywords'),
));
exit();
break;
}
}
exit();
}
Also es wird nicht einmal die Funktion actionAjaxFillTree aufgerufen
hoffe es ist nur ein kleiner fehler und ihr könnt mir schnell weiter helfen
mfg