I am just coding a widget which can render itself, but can also render an admin view.

Because I have ajax in this admin view I have to render the view with CController:renderPartial(), because that’s the only change to get the need javascript code into the result, right?

Why is there no method CWidget::renderPartial(), so I could render the complete view inside the widget.

Best regards,


Why not use Yii::app()->controller->renderPartial()?

Because the widget would know exactly where its views are.

But, yeah, that’s my current solution.