Q:

Refresh the view after I submitted POST params on deleting a record

My question is how can I refresh my view "search.ctp" to take into account the record I just deleted. The problem is the following.
My controller code
public function search() {
    if ($this->request->is('post')) {
        $this->set("isPost", TRUE);
        $query = $this->data;
        $output = $this->Question->find("all",             array("conditions"=>array("Question.lectureId"=>$query["Lecture"]["Lecture"],
                                                                         "Question.type"=>$query["Lecture"]["status"])));
        $this->set("questions", $output);

    } else {
        $this->LoadModel("Lecture");
        $outputL = array();
        $for = $this->Lecture->find("all", array("fields" => array("_id", "title")));
        foreach ($for as $key => $value) {
            $outputL[$value["Lecture"]["_id"]] = $value["Lecture"]["title"];
        }
        $this->set("lectures",$outputL);
        //
        $statuses = array(
            "" => "Select a question type",
            "anonymousQuestion" => "anonymousQuestion",
            "handUp" => "handUp",
            "userQuestion" => "userQuestion"
            );
        $this->set("statuses", $statuses);
    }   
}

So the following happens;
I open the view "search.ctp" ("my admin interface"), set the 2 search params,
and use the submit button to post that data. Then my IF statement recognizes that as POSt and gives me back my query results. The problem is when i delete a record...
It redirects me back to my search action to enter the query params again... How do i just refresh the page with the same query params and NOT leave my view.
o forgot my delete function code:
            public function delete($id = null) {
    if (!$this->request->is('post')) {
        throw new MethodNotAllowedException();
    }
    $this->Question->id = $id;
    if (!$this->Question->exists()) {
        throw new NotFoundException(__('Invalid configuration'));
    }
    if ($this->Question->delete()) {
        $this->Session->setFlash(__('Question deleted'));
    return $this->redirect(array("action"=>"search"));
    }
    $this->Session->setFlash(__('Question was not deleted'));
    $this->redirect(array('action' => 'search'));
}

A:

As a workaround i made another function that does the same thing with GET request that my search function does with a POST request. Basically returns the data with the query params. And i used the Session helper to carry the query over to my other function. Dont know how smart that was, but it does the trick for me...
Still would be nice to know if someone has a solution where i dont have to make another function/view

