As an amendum to the question "Loading complex forms with Struts.". I have
found a solution and more problems :-(
> I need the data loaded into two beans, one for the Subsystem:
> String name;
> String time;
> List signals;
>
> And then one to hold all the subsystems:
> List subsystems;
>
> 1) I need to know if [OT] this can be written in html?
Html does not do forms in forms. But I have come accross a solution using
multiple forms and a small piece of java code to force all forms to submit
at the same time.
[FYI]
<!--
<script language="JavaScript">
function SubmitAll() {
document.form1.submit();
document.form2.submit();
....
document.formN.submit();
}
</script>
<form name="form1" ..../>
<form name="form2" .... />
....
<form name="formN" .... />
<input type="button" value="Submit" canClick="SubmitAll()" />
-->
HOWEVER
In struts-config the following action is required:
<action path="/formprocess"
name="form1"
scope="request"
validate="true"
type="com.test.action.FormProcessAction">
<forward name="success" path="/StrutsCXServlet"/>
<forward name="error" path="/idiot.do"/>
</action>
The question is, can a regexp be used to group all of the forms under the
one action (Such as name="form[1-9]")?? All the form names are dynamically
created, and unknown to struts before posting. Is there a way struts can
handle this sort of form posting?
Kind regards,
Simon
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]