wood burning stoves 2.0*
The moose likes JSP and the fly likes Clarification for jstl <c:foreach> tag Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » JSP
Reply locked New topic
Author

Clarification for jstl <c:foreach> tag

vamsi Pabbisetty
Greenhorn

Joined: Feb 04, 2009
Posts: 6
HI,
I am facing one issue regarding following scenario.

I am getting one array list to jsp page .I am using Jstl (<c:foreach>) for looping through Arraylist. But Arraylist contains Dto which intern contains Arraylist of Vo(value objects)

Problem : I am not able to access Arraylist which is available in Dto.

Code Sample


<c:forEach var="PresentationListDTO" begin="0" items="${modifyList}" step="1" varStatus="status">


<tr>
<td class="table_field"><cut value="${PresentationListDTO.request}"/></td>
<td class="table_field"><cut value="${PresentationListDTO.name}"/></td>
<td class="table_field"><cut value="${PresentationListDTO.company_desc}"/></td>
<td class="table_field"><cut value="${PresentationListDTO.location_desc}"/></td>
<td class="table_field"><cut value="${PresentationListDTO.office_desc}"/></td>
<td class="table_field"><cut value="${PresentationListDTO.dept_desc}"/></td>
<td class="table_field"><cut value="${PresentationListDTO.category_desc}"/></td>
<td>
<c:forEach var="PresentationListVo" begin="0" items="${PresentationListDTO.voList}" step="1">
<td class="table_field"><cut value="${PresentationListVo.item}"/></td>
</c:forEach>

</td>

</
</c:forEach>

Geiing error while executing Inner <c:foreach> loop.
error - "${PresentationListDTO.voList}": Unable to find a value for "voList" in object of class 'Dto class'
using operator "." (null)
Balagopal Kannampallil
Ranch Hand

Joined: Oct 18, 2004
Posts: 136

Duplicate thread
From next time onwards, please choose the forums carefully when posting queries.


SCJP 5.0 and now fighting with ExtJS
vamsi Pabbisetty
Greenhorn

Joined: Feb 04, 2009
Posts: 6
Hi Balagopal Kannampalli,
Sorry for mistake. I will take care this while posting next time. Thanks for inputs.
 
wood burning stoves
 
subject: Clarification for jstl <c:foreach> tag
 
Similar Threads
Clarification for jstl <c:foreach> tag
javax.servlet.ServletException: javax/el/ValueExpression
jsp:useBean && forEach
Pagination in jsp
pass jstl sql query result to jsp