部品の作成(2/2)
アクションの作成
Serviceクラスの作成が終われば、後はそのServiceクラスを利用するActionの作成をしておきます。タブ画面には追加、更新、削除を行う必要があるハズなので、それに基づいたアクションを作成していきます。アクションの作成は次のように行います。
[ Command list ]
0 : (exit)
1 : action
2 : command
3 : dao
4 : dicon
5 : entity
6 : goya
7 : interceptor
8 : module
9 : service
choice ? : 1
[ Module list ]
0 : (exit)
1 : tabedit
choice ? : 1
action name ? : Add
[ generate information ]
module name : tabedit
action name : Add
action class name : AddAction
action dicon file name : AddAction.dicon
action template file : Add.tpl
confirm ? (y/n) : y
:
:
[ Command list ]
0 : (exit)
1 : action
2 : command
3 : dao
4 : dicon
5 : entity
6 : goya
7 : interceptor
8 : module
9 : service
choice ? : 1
[ Module list ]
0 : (exit)
1 : tabedit
choice ? : 1
[ Module list ]
0 : (exit)
1 : tabedit
choice ? : 1
action name ? : Update
[ generate information ]
module name : tabedit
action name : Update
action class name : UpdateAction
action dicon file name : UpdateAction.dicon
action template file : Update.tpl
confirm ? (y/n) : y
:
:
[ Command list ]
0 : (exit)
1 : action
2 : command
3 : dao
4 : dicon
5 : entity
6 : goya
7 : interceptor
8 : module
9 : service
choice ? : 1
[ Module list ]
0 : (exit)
1 : tabedit
choice ? : 1
action name ? : Delete
[ generate information ]
module name : tabedit
action name : Delete
action class name : DeleteAction
action dicon file name : DeleteAction.dicon
action template file : Delete.tpl
confirm ? (y/n) : y
:
:
以下、同じ要領で、ListActionとSelectActionを作成しました。
action name ? : List [ generate information ] module name : tabedit action name : List action class name : ListAction action dicon file name : ListAction.dicon action template file : List.tpl [ generate information ] module name : tabedit action name : Select action class name : SelectAction action dicon file name : SelectAction.dicon action template file : Select.tpl [ Command list ] 0 : (exit) 1 : action 2 : command 3 : dao 4 : dicon 5 : entity 6 : goya 7 : interceptor 8 : module 9 : service choice ? : 0 BUILD FINISHED
このようなコマンドを入力するだけの流れで、基本的な設定が行われたスケルトンファイルが生成されます。
おわりに
これまで環境の導入から、プロジェクトの作成、各スケルトンファイルの作成を行ってきました。後編ではこのスケルトンファイルを修正しながら実際のアプリケーションを作っていきます。
