Use square brackets '[' instead of parenthesis when you build the 'name' like:
<% for (int i=0; i<10; i++) {
String name = "value(" + i + ")";
%>
<html:text property="<%=name%>"/><br/>
<%
}
%>
-----Original Message-----
From: ashokd [mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 09, 2003 5:37 PM
To: Struts Users Mailing List
Subject: Dynamic Forms Problem
MessageHi,
In my application the form fields are dynamic.
For this functionlity in FormAction class I defined the following code:
private final List values = new ArrayList();
public void setValue(int key, Object value) {
values.set(key, value);
}
public Object getValue(int key) {
return values.get(key);
}
How to define these controls in JSP page?
I defined like below:
<% for (int i=0; i<10; i++) {
String name = "value(" + i + ")";
%>
<html:text property="<%=name%>"/><br/>
<%
}
%>
But it is throwing exception:
No getter method for property value(0) of bean
org.apache.struts.taglib.html.BEAN: javax.servlet.jsp.JspException: No getter method
for property value(0) of bean org.apache.struts.taglib.html.BEAN
Can any one help on this (How to set in JSP page)
Thanks in Advace,
Ashok.D
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>