我认为您不需要使用模型来检索数据。它应该在控制器部分完成。
假设以下是一个函数是一个控制器(您可以将此函数称为任务)。
public function someFunction(){
// retrive data from the form coming via $_POST (and consider sanitizing it)
$data = JFactory::getApplication()->input->get('id', null, 'post');
/*get model. You can call any model you want.
You can even call multiple models using this function
*/such as $model2 = getModel('SecondModel'); $model3 = getModel('ThirdModel');
$model = $this->getModel('FirstModel'); //FirstModel should be an existing model
$model->save($data);
$formatted_data = $model->getData();
$view=& $this->getView('OtherView','html'); //call any view you like
$layout=JRequest::getVar('tmpl','default'); //instead of default you can use other template you prepared (such as edit...)
$view->setLayout($layout); //bind the layout to the view
//Pass the value to view. You can access this value in view as $this->formatted_data; later
$view->set('formatted_data',$formatted_data);
/*Call the view's display.
If you prepare other function in your view other than display,
you can use this function too. e.g. $view->display_report();
But make sure you call parent::display() inside the function.
*/
$view->display();
}