Action Into Widget

Hi

I want some action in custom widget

I found this wiki about that

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

But I want the actions function into widget not as an CAction class

I want it As be done in controller.

In the wiki the actions are declared in static function




class myWidget extends CWidget {

...

 public static function actions(){

        return array(

           'GetData'=>'application.components.actions.getData',

        );

    }

...

}






//we have to make another one file with this code

class getData extends CAction{

    public function run(){

        echo 'HELLO WORLD';

    }

}

How can the same thing but like that


class myWidget extends CWidget {

...

public function actionGetData() {


}

...

}



I tried that but does not work!

According to the comments of the same wiki

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

There is no way to do that because widget works as a provider and not like a controller

So there is only one way to do that