I have been working with the development of a component. Now I have a form in the component
that is submitting to a index.php?option=com_mycomponent&task=myTask. Now in the controller
I have the function myTask() and I am specifying the view and layout like this
$model = $this->getModel('mymodel');
$view =& $this->getView('myview');
$view->setModel($model, true );
$view->displayReports();
I have the displayReports() function in the view.html.php and it is like this
function displayReports($tpl = null){
global $mainframe;
$this->_layout = 'viewcjreport';
$reports= & $this->get('Reports');
$this->assignRef('reports',$reports);
parent::display($tpl);
}
But when I submit the form I am getting error as ‘View not found [name, type, prefix]:
cjunction,,kingdomView’.
Please let me know what is the issue here and how can I specify the
view correctly. It will be a great help.
From memory to make this work you need to create
in components/views/cjunction/view.html.php