Hi Friends ,
I m new to Joomla and I developed a admin part component and after successfull data insert I need to do a redirect to my component view.
My doubt is how to do this redirection from my "Model"
I got a code Like this
$msg = 'A MESSAGE';
$link = 'index.php?option=com_gallery';
$this->setRedirect( JRoute::_($link, false), $msg,'error' );
But this giving the following error
Fatal error: Call to undefined method GalleryModelitem::setRedirect() in C:\wamp\www\joomla\administrator\components\com_gallery\models\item.php on line 126
Please help
Thanks in advance