Hi,
I have class A and class B where
class A hold a Collection of calss B in "My_List".
******************************************
public class A {
private String My_StringA;
private java.util.List My_List;
public void setMy_StringA(String param){
this.My_StringA = param;
}
public String getMy_StringA(){
return this.My_StringA;
}
public void setMy_List(java.util.List param){
this.My_List = param;
}
public List getMy_List(){
return this.My_List;
}
}
***************************
public class B {
private String My_StringB;
public void setMy_StringB(String param){
this.My_StringB = param;
}
public String getMy_StringB(){
return this.My_StringB;
}
}
***********************************
Let's say that I have a Collection of class A saved
in request attribute called "X".
(request.setAttribute("X", ... collection of classes A);
How can I print out all My_StrigsB for every calss of A using JSTL forEach ?
I tried something like this, but it didn't work:
<table>
<c:forEach var="test1" items="${X}">
<tr>
<td><c:out value="${test1.My_StringA}"/></td>
</tr>
<c:forEach var="test2" items="${test1[My_List]}">
<tr>
<td><c:out value="${test2.My_StringB}"/></td>
</tr>
</c:forEach>
</c:forEach>
</table>
What am I doing wrong?
Regards
Marino Tudor
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>