How Create Component

i want create some component, for example

class Geo extends CWidget


        public $text;


	public function run()



            if (Yii::app()->request->isPostRequest)


                $this->text = Yii::app()->request->getPost('text');


            $this->render('geo', array(








<input type="text" id="text" name="text" value="<?php echo $text; ?>" />

now i want to put this component inside controller

this is view controller

echo CHtml::beginForm();


echo CHtml::submitButton('OK');

echo CHtml::endForm();

so how can i access of new value of property text in controller?

$geo=new Geo;

if (Yii::app()->request->isPostRequest)

    $geo = $_POST['Geo'];// don't work

echo $geo->text;

please read the "working with forms" - section of the guide beginning here

also check the

It has the same thinks that you looking for