Hi Stephan,

I tried to adopt your solution, like this:

<s:iterator value="#list1" status="rowstatus">
     <s:text name="names" >
        <s:push value="#someObject.list2[#rowstatus.index]">
                <s:param name="value" value="name"/>
             </s:push>
     </s:text>
</s:iterator>

but I get: Error loading 'myApp/showFruits.action' (500 Internal Server
Error),
and there is nothing in log.

?

--
Regards, Milan


&quot;Stephan Schröder&quot; wrote:
> 
> this code here works for me:
> <@s.set name="list1" value="%{{'apple','banana'}}" />
> <@s.set name="list2" value="%{{'juice','cream'}}" />
> 
> <@s.iterator value="#list1" status="rowstatus">
>   <@s.property />
>   <@s.push value="#list2[#rowstatus.index]">
>     <@s.property />
>   </@s.push>
>   <br>
> </@s.iterator>
> 
> (Notice: this is freemarker-Syntax, to get JSP-Syntax replace "@s." with
> "s:")
> 
> Maybe you forgot an '#' somewhere? How are fruit1,2 obtained?
> 
> /Stephan
> 
> -------- Original-Nachricht --------
>> Datum: Wed, 20 Aug 2008 09:05:55 -0700 (PDT)
>> Von: Milan Milanovic <[EMAIL PROTECTED]>
>> An: user@struts.apache.org
>> Betreff: Re: [S2] Iterate through two lists
> 
>> 
>> Dear Dave,
>> 
>> yes, I tried with index too, but it doesn't work. No, there is nothing in
>> log.
>> 
>> --
>> Regards, Milan
>> 
>> 
>> newton.dave wrote:
>> > 
>> > --- On Wed, 8/20/08, Milan Milanovic wrote:
>> >> No, this doesn't work. I get: "500 Internal Server
>> >> Error" if I use this.
>> > 
>> > First of all, it should be rowStatus.index, which is zero-based (count
>> is
>> > one-based).
>> > 
>> > Second of all, is there anything in the log?
>> > 
>> > Dave
>> > 
>> >> &quot;Stephan Schröder&quot; wrote:
>> >> > 
>> >> > I'm not sure whether the syntax is completly right
>> >> but it should work like
>> >> > this:
>> >> > 
>> >> > <s:iterator value="fruits1"
>> >> status="rowstatus">
>> >> > 
>> >> >     <s:property value="name" />
>> >> > 
>> >> >     <s:push
>> >> value="fruits2[#rowstatus.count]">
>> >> >         <s:property value="name" />
>> >> >     </s:push>
>> >> > 
>> >> > </s:iterator>
>> >> > 
>> >> >> View this message in context:
>> >> >>
>> >>
>> http://www.nabble.com/-S2--Iterate-through-two-lists-tp19052842p19052842.html
>> >> > -- 
> -- 
> Psssst! Schon das coole Video vom GMX MultiMessenger gesehen?
> Der Eine für Alle: http://www.gmx.net/de/go/messenger03
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/-S2--Iterate-through-two-lists-tp19052842p19091081.html
Sent from the Struts - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to