You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Thorsten Scherler <co...@target-x.de> on 2004/02/04 18:16:06 UTC

Submit two Form with JScript (was Accessing ActionForm from Servlet )

-> I don't know for sure. That's why I asked if I was right... :)

Reading your reply me neither LOL ;-)

-> 
-> Anyway:
-> 
-> (1) How do you associate 2 ActionForms to the same Action (and have
-> them automatically associated and populated by Struts)?

If you mean:
<action
      attribute="serviceForm"
      input="/form/serviceedit.jsp"
      name="serviceForm"
      path="/serviceedit"
      type="sonda.action.ServiceActionEdit"
      validate="false">
      <forward name="success" path=".service.edit.Def" />
      <forward name="error" path=".error.Def" />
</action>

To add an attribute like 'attribute="serviceExForm"' (I think and aggree) it's
not possible.
But you asked to access the values of a (or n) given form. That then would be
possible due to the import of the other Form like I stated before. 

-> 
-> (2) Assuming 1 is possible (I'd really appreciate if you could explain
-> me how to acomplish that), what sense does it make to have 2 ActionForms
-> variables if only one form can be submitted at a time anyways? (maybe
-> I'm missing something else)
->

As longer I think about it I am really not sure anymore (I am at work not home
where I have the example that I am refering to) but I think I did it with
Jscript and submited two form through one:
like this <form action="bla.do" onSubmit="submitFormBToo"/>
 
-> (3) Despite 1 and 2, there must be a method to obtain the ActionForm(s)
-> associated to an Action (during an specific request / post). Right?
-> 

Jupp, that right!

-> Regards,
-> Freddy.
->

King regards
</thorsten>


---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org