I got a similar problem and resolved it by adding indexed accessors to the bean. Add methods like getRoutingData(int index) and setRoutingData(int index, RoutinData data).
 
 
Hatinder
-----Original Message-----
From: Katarina Nelson [mailto:[EMAIL PROTECTED]]
Sent: Thursday, March 08, 2001 10:29 AM
To: Struts-User
Subject: Iterate an indexed property?

Hi,
 
I try on my jsp page iterate an indexed property.
I get this exception:
"javax.servlet.ServletException: Invalid indexed property 'routingData[<%=s%>]'"
 
My code:
<%
int counter = 0;
String s = null
s.valueOf(counter);
for (int i = 0; i < myRoutingList.getRouteElements().size(); i++) {
%>
 
<tr>
<td class="input">
<html:text property="routingData[<%=s%>].timeOfDayStart" size="6"/></<td class="input">
<html:text property="routingData[<%=s%>].timeOfDayStop" size="6"/>
</td>
 </tr>
 <%
 counter++;
 s = s.valueOf(counter);
 }
  %>
 
I tried both with counter as an int and a string . No one seems work.
Do somebody know what�s is the problem?
 
Thanks,
Katarina
 

<%=s%>
 
***********************************************************************************
We invite you to sign up for eSource, our portal for entrepreneurs providing access to content and services from national service providers who are proven resources to the entrepreneurial community. Click on http://esource.svb.com to register for service at no charge. We would be delighted to receive your feedback.
***********************************************************************************
This message contains information from Silicon Valley Bank which may be confidential and privileged. If you are not an intended recipient, please refrain from any disclosure, copying, distribution or use of this information and note that such actions are prohibited. If you have received this transmission in error, please notify the sender immediately by telephone or by replying to this transmission.
***********************************************************************************


Reply via email to