Widget with actions - how to access Widget's properties ?

Hi there,

I’ve created a Widget with CActions. The problem I have is that when the CACtion is called the “runtime visibility” is the one of the current Controller and not the Widget’s “Controller” (makes sense since the widget only provides the actions to the current controller which executes them). So there’s no way to access the Widget’s properties within the CActions.

Any idea how I could achieve that ?

Cheers

Renaud

http://www.yiiframework.com/wiki/146/how-to-use-a-widget-as-an-action-provider/

I think you should read its last part: passing parameters. You can pass parameters only by GET/POST or this way. you won’t get ‘widget’ instance because actions are called upon requests and there is no reference tahta time what widget instance caused the request (or maybe it was not widget at all).