Java Mailing List Archive

http://www.junlu.com/

Home » Home (12/2007) » Struts 2 »

Show info from collection by levels and check data type

Francisco Exposito Aguilera

2007-03-31

Replies:

Hi all,

In the jsp page I sent a collection which contains integer and string
values:

[1, "A", 2, "B", 2, "C", 1, "D", 2 , "E", 3, "F", 3, "G"]

In the page I want to obtain the data (strings of the collection) in the
correct level (integers of the collection)
A
 B
 C
D
 E
   F
   G

In the jsp I have:

<logic:iterate name="estructuraAsociacion" id="estructura">
 //Si el valor de la collection es un integer ????
 <c:set var="espacios" value="${estructura}"/>
 //Fin si el valor de la collection es un integer ????


 //Si el valor de la collection es un string ????
   <tr>
     <td>
       <c:forEach begin="1" end="${espacios}">
         &nbsp
       </c:forEach>
       <c:out value="${estructura}"/>
     </td>
   </tr>
 //Fin si el valor de la collection es un string ????
</logic:iterate>

?Is this idea correct? If yes, how can I know if the actual value of the
collection is an integer or a string? If my idea is not correct, could you
guide me???

Thanks a lot
Regards,
Paco

_________________________________________________________________
Descubre la descarga digital con MSN Music. M?s de un mill?n de canciones.
http://music.msn.es/


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@(protected)
For additional commands, e-mail: user-help@(protected)

©2008 junlu.com - Jax Systems, LLC, U.S.A.