You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by "FARINE Arnaud - SOP ( AFarine@sophia-antipolis.sema.slb.com )" <AF...@sophia-antipolis.sema.slb.com> on 2002/03/01 14:50:37 UTC

logic:iterate String.

Hi!
I use a Vector object which contains String Object.
This Vector is in a JavaBeans, so I've got a getter method, which returns
the Vector.
When I want to iterate the list by:
<logic:iterate id="val" type="java.lang.String" name="user"
property="infoDB">
	????????
</logic:iterate>
How replace the "?????" by a good code?!
I haven't idea! If my Vector contains some other complex object (others
beans for examples), this works well.
How do I to diplay my String(s)?

Thx for your answers

************************************************* 
SchlumbergerSema
Arnaud FARINE 
Ingénieur chargé d'études
Tel: 04.97.15.79.18 
AFarine@sophia-antipolis.sema.slb.com
 
150, Allée Pierre Ziller
Les Bouillides - BP279
06905 Sophia-Antipolis Cedex
Fax: 04.94.15.89.01 
 ************************************************* 



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: logic:iterate String.

Posted by Mikael Eriksson <mi...@connection.se>.
Hi

Use

  <bean:write name="val" />

Inside your iterate
As I understand you you just want to display things... Bean:write does a 
toString
(or something like that) of the bean if not property is mentioned.

  Regards
  Mikael


At 14:50 2002-03-01 +0100, you wrote:
>Hi!
>I use a Vector object which contains String Object.
>This Vector is in a JavaBeans, so I've got a getter method, which returns
>the Vector.
>When I want to iterate the list by:
><logic:iterate id="val" type="java.lang.String" name="user"
>property="infoDB">
>         ????????
></logic:iterate>
>How replace the "?????" by a good code?!
>I haven't idea! If my Vector contains some other complex object (others
>beans for examples), this works well.
>How do I to diplay my String(s)?
>
>Thx for your answers



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>