• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

logic:iterate problem

 
AnilPrakash Raju
Ranch Hand
Posts: 137
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I got a funny problem with logic: iterate.

With the following code:

<logic:iterate name="vHvnsDriverVec" id="vHvnsDriver1" scope="request">
<tr>
<td><bean:write name="vHvnsDriver1" property="driverNo"/></td>
<td><bean:write name="vHvnsDriver1" property="licenceNumber"/></td>
<td><bean:write name="vHvnsDriver1" property="licenceState"/></td>
</tr>
</logic:iterate>

In the action i can see that the vHvnsDriverVec contains several
entries.
In the jsp the vHvnsDriverVec is not empty( i tested this with <logic:notempty> but the values are not displayed.

What am i doing wrong?

Thanks in advance

Anil
 
sreenath reddy
Ranch Hand
Posts: 415
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi anil

The entries are there in action class fine but had u set that vector to request scope and u had used logic:notempty but there might be a chance that vector may be empty of size 0.so rell me if u r getting some error
 
AnilPrakash Raju
Ranch Hand
Posts: 137
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I finally got it working.

It was my fault. I forgot to include :

<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>



Anil
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic