struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Li Ying <liying.cn.2...@gmail.com>
Subject Re: OGNL map key reading
Date Thu, 18 Nov 2010 12:02:51 GMT
try:

invoke the [get] method on map:
<s:property value="currentPageHotelList[#stat.index].get(#roomindex)"/>

or
reference property on map:
<s:property value="currentPageHotelList[#stat.index].(#roomindex)"/>


or
iterator on values of map:
<s:iterator value="currentPageHotelList[#stat.index].values" var="item">
    <s:property value="#item"/>
</s:iterator>

or
iterator on keys of map:
<s:iterator value="currentPageHotelList[#stat.index].keys" var="itemKey">
    <s:property value="currentPageHotelList[#stat.index].get(#itemKey)"/>
</s:iterator>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message