とても簡単なことだと思います。コントローラーの対応する関数を表示しているとします。関数は次のようになります。
class SomeController extends AppController{
public function action(){
.
.
.
if($this->request->is('post')){
.
.
.
if(some error appears)
I want to get back to the "action" view with the data that was given to it before
else
continue processing
.
.
.
}
populate $data and send it to the view "action";
}
つまり、いつでもデータを使用して特定のビューに戻りたいだけです。を使用redirect(array('controller'=>'some','action'=>'action'))
しましたが、うまくいきませんでした。usingrender()
は $data を取りません。私を助けてください。