You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Lachdanan <la...@gmx.de> on 2004/04/06 01:29:07 UTC

logic:iterate over an array of Strings

Hello, could anyone help me? I want to iterate over a String[]. This should
be possible according to the Jakarta Struts User Guide

"The collection to be iterated over MUST conform to one of the following
requirements in order for iteration to be successful:

  a.. An array of Java objects or primitives. "
But the examples only are about objects with attributes.

Some advice would be great! Thx

Joe




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


RE: logic:iterate over an array of Strings

Posted by Daniel Perry <d....@netcase.co.uk>.
I believe you just treat it as with any other collection:

<logic:iterate name="stringArrayVariable" id="aString">
<bean:write name="aString"/>
</logic>

Daniel.

-----Original Message-----
From: news [mailto:news@sea.gmane.org]On Behalf Of Lachdanan
Sent: 06 April 2004 00:29
To: user@struts.apache.org
Subject: logic:iterate over an array of Strings


Hello, could anyone help me? I want to iterate over a String[]. This should
be possible according to the Jakarta Struts User Guide

"The collection to be iterated over MUST conform to one of the following
requirements in order for iteration to be successful:

  a.. An array of Java objects or primitives. "
But the examples only are about objects with attributes.

Some advice would be great! Thx

Joe




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



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