Sirs,
Using $this->_forward()
in Zend Framework 1 we redirect to controller
and action
we want. In my case this is not working well in the following situation.
I made a query, I want it after deletar
a record it sum and already redirect to the same screen where the query was.
Another thing is that forward
causes url
to not change .... it redirects, but url
stays with parameter ... /apagar?idRegistro=56
.
Action :
public function apagarAction()
{
$this->_helper->viewRenderer->setNoRender(true);
$idTel = $this->_getParam('idRegistro');
$modTel = new Sca_Model_Telefone('sca');
$idRegistro = $modTel->getAdapter()->quoteInto('idTelefone = ?', $idTel);
$modTel->delete($idRegistro);
$this->_forward('consultar', 'index', 'sistel');
$this->view->deletado = "Registro deletado com sucesso.";
}