Results 1 to 2 of 2
- 02-07-2008, 09:46 PM #1
Member
- Join Date
- Feb 2008
- Posts
- 1
- Rep Power
- 0
foreach in jstl to display nested colums-struts jsp
Iam displaying Columns from Object which in turn has many feilds but this CList is an array other are simple object like fName lName etc...
<display:table name="${form.results}" id="row" cellpadding="true">
<display:column property="fName" value="${row.fName}"/>
<c:forEach var="mycList" items="${cList}">
<c:forEach var="myCSummary" items="${mycList.CSummary}">
<c:out value="${myCSummary.cType}"/>
<display:column property="cAType" value="${row.cAType}"/>
<display:column property="cType" value="${row.cType}"/>
</c:forEach>
</c:forEach>
</display:table>
I hope iam clear, Please reply can we use c:forEach to iterate through list of array object (CList)and which has CSummary , and CSummary has two elements CType and CAType.
// for example
CList=CSummary[5]
[0]=CSummary
// and CSummary this i have two elements
CAType="data"
CType="data"
Thank you,
Adil
- 02-11-2008, 06:19 AM #2
Member
- Join Date
- Feb 2008
- Posts
- 2
- Rep Power
- 0
Similar Threads
-
How to use Foreach on an Array
By Java Tip in forum java.langReplies: 0Last Post: 04-16-2008, 11:06 PM -
Question regarding foreach loop...
By theonlywalks in forum New To JavaReplies: 2Last Post: 03-15-2008, 06:15 AM -
how to display image in jsp page(Struts)
By rama6262 in forum Advanced JavaReplies: 1Last Post: 12-21-2007, 07:50 AM -
Nested loops?
By gabriel in forum New To JavaReplies: 4Last Post: 08-06-2007, 04:51 PM -
Problems Struts-JSTL
By Peter in forum Web FrameworksReplies: 2Last Post: 07-04-2007, 06:26 AM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks