Hi All,
I'm new to
struts and I'm stuck. I'm reading values on a Form from a
jsp page and writing to a different Form on another jsp page. However, I can't access the second Form in my ActionForm class, because only the first form was passed over.
So, how can I get access to other Forms in my Action class?
Here's an illustration of what I have:
JSP#1 {
form name = PackageForm
}
JSP#2 {
form name = ServiceForm
}
-------------------------------
###Struts-config.xml##
<form-bean name="ServiceForm" type="org.apache.struts.action.DynaActionForm">
<form-property name="serviceId" type="java.util.Integer" />
</form-bean>
<form-bean name="PackageForm" type="org.apache.struts.action.DynaActionForm">
<form-property name="packageId" type="java.util.Integer" />
</form-bean>
---------------------------------
## Action class ###
DynaActionForm form = (DynaActionForm) form;<-- THIS IS PackageForm
Integer package = form.get("packageId");
....
form.set("serviceId", value); <--- HERE'S THE PROBLEM!!!
From the action class how can I get ServiceForm and write to it???
Please help!!!