Can someone help me with a problem? I have a form with a list of text boxes that I want to be able to update on submit.
public class PrjPerformanceActionForm extends ActionForm {
private List measures;
}
List is an ArrayList of a Nested object with getters and setters that is populated from a database and displayed on the form. The problem is on submit.
Struts is not calling any of my setter methods. It should be calling setFieldAsString(
String s).
public class ProjectPerformance implements Serializable {
private ProjectPerformanceMeasures projected;
private ProjectPerformanceMeasures verified;
}
public class ProjectPerformanceMeasures implements Serializable {
private long field;
public long getField() {
return field;
}
public String getFieldAsString() {
return GLOBAL.getLongAsNumber(field);
}
public void setFieldAsString(String txtField) {
field = GLOBAL.getValueAsLong(StringHandler.stripSpecialChars(
txtField));
}
JSP
<nested:iterate id="prjPerfMeas" name="<%=formName%>" property="measures">
<html:text name="prjPerfMeas" property="projected.fieldAsString" maxlength="15" size="15">
</html:text>
</td>
<td align=center>
<html:text name="prjPerfMeas" property="verified.fieldAsString" maxlength="15" size="15">
</html:text>
</td>
...
</nested:iterate>
Any help would be appreciated.