[Maple-user: 96] Re: [personal] Re: Validate結果による動きの指定

Back to archive index

bobchin bobchin_ryu****@bb*****
2005年 10月 15日 (土) 10:02:31 JST


 市橋(bobchin)です。

 日記の方でkunitさんに教えてもらいましたが、
 ビューフィルタでテンプレートを表示するのではなく
 アクションに飛ばすということができます。
 こんな感じはどうでしょうか?

 「Action A」でPOSTされたデータをセッションに格納しておいて
 「Action B」実行時にはそのデータを使用して
 「template B.html」を表示するようにしていけないでしょうかね?

//////////////////////////////////////////////////////////////

 アクション
  実行開始
    |
    |Input画面1を表示(Action A)
    ↓
  Input画面1 (template A.html)
    |
    |Input画面2を表示(Action B)←+
    ↓               |
  Input画面2  (template B.html)    |
    |               | (エラーの場合)
    |終了画面を表示(Action C)  |
    |               |
    +−−−−−−−−−−−−−−−+
    ↓
  Finish画面  (template C.html)

 maple.ini
 ---------------------------------------
 [View]
 success = "template C.html"
 executeB = "action:ActionB"
 ---------------------------------------

 ActionC.class.php
 ---------------------------------------
 class ActionC {

	function exectute()
	{
		〜〜〜〜ActionCの処理〜〜〜〜
		
		// エラーの場合はActionBを実行する
		if ($isError) {
			return "executeB";
		} else {
			return "success";
		}
	}

 }

-- 
 ┏━┳━┳━┳━┳┳┳━┳┳┓
 ┃┃┃┃┃┃┃┏┫┃┃  ┃  ┃
 ┃  ┫┃┃  ┫┃┃━┃  ┃╋┃
 ┃┃┃┃┃┃┃┗┫┃┃  ┃  ┃
 ┗━┻━┻━┻━┻┻┻━┻┻┛
bobchin <bobchin_ryu****@bb*****>
Wiki http://bobchin.ddo.jp/wiki/
Diary http://d.hatena.ne.jp/bobchin/




Maple-user メーリングリストの案内
Back to archive index