struts2 select タグを使用しています: http://struts.apache.org/2.0.14/docs/select.html
これがコードです
<s:select name="fmrTenant.terminationReason" multiple="true" headerKey="-1" list="rejectionReasons" value="%{fmrTenant.terminationReason}" required="true" size="10"/>
name="fmrTenant.terminationReason"
次のコードを指します
public void setTerminationReason(List terminationReason) {
this.terminationReason = (String[])terminationReason.toArray();
}
私のコードはここで問題を抱えています。選択ボックスからの値を格納する変数のパラメーターの型はリストにする必要がありますか??
解決策をオンラインで探してみましたが、複数の属性を有効にして struts2 select タグを使用し、Java メソッドがどのように見えるかを示す例はないようです。私はとても混乱しています。