Trouble passing multiple models into a view

Trying to use the ztabularinputmanager following the instructions here:

the actionCreate method of my mode is as below:

	public function actionCreate()


		$model=new Event;

                $mediaManager = new eventMediaManager();

		// Uncomment the following line if AJAX validation is needed

		// $this->performAjaxValidation($model);






                        if (!isset($_POST['noValidate'])){

                          $valid = $model->validate();

                          $valid = $mediaManager->validate($model) && $valid;














but when I run the create action, the _form.php would load with an error saying Undefined variable: mediaManager whenever I used $mediaManager. Does anyone know why?

I used xDebug and verified that $mediaManager exists during the actionCreate, but it seems to disappeared in _form.php. I thought I passed it in. Did I do something wrong?

When you load your form partial, in your create view, do you pass the $mediaManager var ?

Ah… silly me… I kept thinking that passing it the actionCreate would do, played with it for nearly the whole day… sigh… Forgot that it gets to create.php first before it gets to _form.php. Thank you!