1. Christian Salazar
  2. EYuiDemo

Source

EYuiDemo / protected / controllers / ExampleController.php

<?php

class ExampleController extends Controller
{
	public function actions()
	{
		return array();
	}
	
	/**
		demo for EYuiSearch
	*/
	public function actionEYuiSearch() 
	{ 
		$model=new Example; 

		if(isset($_POST['Example'])) 
		{ 
			$model->attributes=$_POST['Example']; 
			if($model->validate()) 
			{ 
				$this->redirect(array('ok'));
				return; 
			} 
		} 
		$this->render('eyuisearch',array('model'=>$model)); 
	}

	public function actionOk(){
		$this->renderText("Ok example finished. <a href='index.php?r=example/eyuisearch'>Start Again</a>");
	}

	/**
		demo for EYuiForm
		
		it will use TblUser as the target user model for this form.
	*/
	public function actionEYuiForm(){
		$user = TblUser::model()->findByPk(1);
		$this->render('eyuiform',array('user'=>$user));
	}
	public function actionEYuiForm2(){
		$user = TblUser::model()->findByPk(1);
		$this->render('eyuiform2',array('user'=>$user));
	}
	public function actionEYuiFormEditor(){
		$this->render('eyuiformeditor');
	}
	
	public function actionEYuiAjaxAction() 
	{ 
		$this->render('eyuiajaxaction'); 
	}	
}