Interstage Studioワークベンチを利用して、Ajaxフレームワーク環境定義ファイル(acf.xml)に必要な定義を記述します。
Interstage Studioワークベンチの操作方法については、“5.7.10 Ajaxフレームワーク環境定義ファイルの編集”を参照してください。
データBeanの定義
Apcoordinator用に作成したデータBeanを、それぞれ、定義します。
acf.xmlの記述内容
<!-- データBean定義 -->
<dataBeans>
<!-- 検索条件 -->
<dataBean>
<dataBeanId>searchCondition</dataBeanId>
<className>ajaxSample.ConditionBean</className>
<scope>request</scope>
</dataBean>
<!-- 一覧 -->
<dataBean>
<dataBeanId>searchList</dataBeanId>
<className>ajaxSample.ListBean</className>
<scope>request</scope>
</dataBean>
<!-- 一覧レコード -->
<dataBean>
<dataBeanId>searchRecord</dataBeanId>
<className>ajaxSample.RecordBean</className>
<scope>request</scope>
</dataBean>
</dataBeans>コンバータ設定の定義
JavaScriptオブジェクトとJavaオブジェクト(データBean)のデータ型変換を行うために、コンバータおよびコンバータを適用するルールを定義します。
acf.xmlの記述内容
<conversion>
<!-- コンバータの定義 -->
<!-- 検索条件 -->
<defConverter>
<converterId>conditionBeanConverter</converterId>
<beanConverter>
<concreteType>ajaxSample.ConditionBean</concreteType>
</beanConverter>
</defConverter>
<!-- 一覧レコード-->
<defConverter>
<converterId>recordBeanConverter</converterId>
<beanConverter>
<concreteType>ajaxSample.RecordBean</concreteType>
</beanConverter>
</defConverter>
<!-- 一覧 -->
<defConverter>
<converterId>listBeanConverter</converterId>
<beanConverter>
<concreteType>ajaxSample.ListBean</concreteType>
<child>
<property>list</property>
<collectionConverter>
<concreteType>java.util.Vector</concreteType>
<child>
<property>element</property>
<type>ajaxSample.RecordBean</type>
</child>
</collectionConverter>
</child>
</beanConverter>
</defConverter>
<!-- コンバージョンルール定義 -->
<!-- 検索条件 -->
<conversionRule>
<type>ajaxSample.ConditionBean</type>
<converterId>conditionBeanConverter</converterId>
</conversionRule>
<!-- 一覧レコード -->
<conversionRule>
<type>ajaxSample.RecordBean</type>
<converterId>recordBeanConverter</converterId>
</conversionRule>
<!-- 一覧 -->
<conversionRule>
<type>ajaxSample.ListBean</type>
<converterId>listBeanConverter</converterId>
</conversionRule>
</conversion>