日期:2014-05-20 浏览次数:20846 次
<s:iterator value="countryList">
<s:param name="newsid" value="countryName" />
<s:param name="newsid" value="ctryValue" />
<s:param name="newsid" value="ctry" />
......
</s:iterator>
------解决方案--------------------
写错,sorry
<s:iterator value="countryList">
<s:property value="ctyrname" />
......
</s:iterator>
------解决方案--------------------
private List myResult;
setLIst...
getList...
public String doAction(){
this.myResult = new ArrayList();
Country country = new Country();
country.setName("国家名称 ");
country.setValue("国家的名称 ");
myResult.add(country);
Country country = new Country("南京");
country.setName("国家区号");
country.setValue("国家的区号");
myResult.add(country);
}
//jsp:
<ww:iterator value="myResult" status = "st">
<ww:property value="myResult.get(#st.index).name"/>
<ww:property value="myResult.get(#st.index).value"/>
</ww:iterator>
<ww:hidden value="myResult"/>//submit after get myResult..