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(

                'text'=>$this->text,          

            ));

		

	}

	

}


//view


<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();


$this->widget('Geo');

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

http://www.yiiframework.com/doc/guide/1.1/en/form.overview

also check the

http://www.yiiframework.com/wiki/139/how-to-create-nice-modal-login-widget-with-a-cjuidialog/

It has the same thinks that you looking for