struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Emil Dombagolla <dombago...@gmail.com>
Subject Re: OGNL map key reading
Date Thu, 18 Nov 2010 07:59:30 GMT
Thanks for the soultion, it s true, i can handle that way

Emil

On Wed, Nov 17, 2010 at 9:25 PM, Steven Yang <kenshin520@gmail.com> wrote:

> so currentPageHotelList[#stat.index] gives a Map?
>
> if ur using an iterator u can just do
> <s:iterator value="list" var="map"> <-- of course u can use "top" as well
> but l like giving it a name
> <s:property value="map[#roomindex]"/>
> </s:iterator>
>
> On Wed, Nov 17, 2010 at 4:13 PM, Emil Dombagolla <dombagolla@gmail.com
> >wrote:
>
> > Dear all,
> >
> >
> >
> >
> -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
> >
> > <s:property value="currentPageHotelList[#stat.index].room0"/> //this
> works
> > ,
> > i want room0 make dynamic  ( like room0 to room4)
> >
> >
> > <s:iterator begin="0" end="5" >
> >
> >  <s:set var="roomindex" value="'room'+top"></s:set> //this gives room0
> > ,room1 ,room2 etc...
> >
> >    <s:property value="currentPageHotelList[#stat.index].%{#roomindex}"/>
> //
> > this %{#roomindex} doesnt work
> >
> >
> >
> >
> -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
> >
> >
> >
> > please help me to get the roomindex variable executed there to read my
> map
> >
> > If possible thank you so much,
> > Emil
> >
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message