Begincontent And Registered Javascript

Hi and Merry Christmas

I test a custom action without rendering a view.

I make it using in controller

$this->beginContent() echoes... 


Everything works fine except the loading of javascript file (core jquery too), even if I set the Yii::app()->clientScript->registerCoreScript(‘jquery’); in my theme

The problem disappear by using $this->render(‘a view’) but I want to sort my code for a few specific actions (without view files)

I am wondering if the begincontent - endcontent has equivalent affects with render of view


To add JS from client script component you need to call processOutput() method. I think you can do it like this:

$this->beginContent() echoes... 


echo $this->processOutput('');

Thank you seb, it works! :)