Apache Struts Form のための設定ファイルを自動生成します。
要素名 | 型 | デフォルト | 説明 |
- package sample.struts;
- import org.apache.struts.action.ActionForm;
- import blanco.gettersetter.BlancoGetterSetter;
- import blanco.struts.BlancoStrutsForm;
- /**
- * サンプル・フォーム。
- */
- @BlancoStrutsForm
- public abstract class AbstractSampleForm extends ActionForm {
- private static final long serialVersionUID = 1L;
- /**
- * 文字列のフィールド。
- */
- @BlancoGetterSetter
- protected String field1;
- /**
- * 整数のフィールド。
- */
- @BlancoGetterSetter
- protected int field2;
- }
- /*
- * このクラスは 'AbstractSampleForm' の具象クラスとして blanco Framework によって自動生成されました。
- */
- package sample.struts;
- import blanco.fw.BlancoGeneratedBy;
- /**
- * サンプル・フォーム。
- */
- @BlancoGeneratedBy(name = "Blanco2g")
- public class SampleForm extends AbstractSampleForm {
- /**
- * シリアルバージョン UID.
- */
- private static final long serialVersionUID = 1L;
- /**
- * 文字列のフィールド。
- *
- * @return 取得したい値。
- */
- public String getField1() {
- return field1;
- }
- /**
- * 文字列のフィールド。
- *
- * @param field1 設定したい値。
- */
- public void setField1(final String field1) {
- this.field1 = field1;
- }
- /**
- * 整数のフィールド。
- *
- * @return 取得したい値。
- */
- public int getField2() {
- return field2;
- }
- /**
- * 整数のフィールド。
- *
- * @param field2 設定したい値。
- */
- public void setField2(final int field2) {
- this.field2 = field2;
- }
- }
- <?xml version="1.0" encoding="UTF-8"?>
- <!DOCTYPE struts-config PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 1.3//EN" "http://struts.apache.org/dtds/struts-config_1_3.dtd">
- <struts-config>
- <form-beans>
- <!-- サンプル・フォーム。 -->
- <form-bean type="sample.struts.SampleForm" name="SampleForm" />
- </form-beans>
- </struts-config>