Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
私はphp/cakephpの新人です。私の質問は-paginator::sortを使用してデータを並べ替えた後、フォームデータ(モデルに保存されていない)を保持する方法はありますか?明らかに、paginator sortリンクをクリックすると、別のURLに移動するため、_postedデータは表示されなくなります。私がコードに何を持っているかをあなたに示すために-範囲スライダーとチェックボックスが設定された単一のフォームがあります。
これは、コントローラー内の異なるアクション間で投稿されたデータを共有する必要がある場合に役立ちます。コントローラクラスでは、各アクションの先頭に次のコードを追加します。
// retrieve or save search data if(!empty($this->data)) $this->Session->write('SearchData', $this->data); else $this->data = $this->Session->read('SearchData');