Strus2でのJSPにおいて、アクションから渡されたリストの要素を表示したいのですがうまくいきません。
下記のような記述をしています。
<s:property value="%{searchBeanList[0].itemSubCode}"/>
<s:property value="%{#searchBeanList[0].itemSubCode}"/>
またテキストタグなら表示されたので、画面にパラメータが渡っていることは間違いないです。
<s:textfield name="searchBeanList[0].itemSubCode" />
iteraterを使用せずに指定要素番号の値を表示したいのですが、
解決方法がおわかりになる方はいらっしゃいますでしょうか。
●Action
private List<StockBean> beanList = new ArrayList<StockBean>(); StockBean bean = new StockBean(); bean.setItemSubCode("テスト") beanList.add(bean)
●bean
public class StockBean implements Serializable{
private String itemSubCode;
public String getItemSubCode() { return itemSubCode; } public void setItemSubCode(String itemSubCode) { this.itemSubCode = itemSubCode; }
}
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。