That's the beauty of the ActionMapping (i.e., the loose coupling of Action code with application flow). Just create a separate mapping for the same action as A_input.do (A_input_from_B.do maybe) but where the success forward is mapped to B_addedA.do.

The less beautiful part is that you'd like a simple JSP that can just do something like...

<html:form action="A_save.do" ...>

... but with multiple mappings for the save Action, the JSP will need to know whether the action attribute should be "A_save.do" or "A_save_from_B.do".

That's simple logic to put in a page, but it would be nice not to have to put it there.

I'm interested to see what other responses you get on this, because I've dealt with similar things a couple of times in the past, where one form JSP could submit to various paths, and I was never crazy about the options I thought of. In one case, the form was actually included by a different page depending on which path should be used, so I had the including page pass the action path (either as a request parameter or request attribute, I don't recall which). In the other case, the form always submitted to the same path, which was mapped to an action that had logic in it to determine which other action should actually handle the request. The mapping for that action was something like:

   <action path="/do_something" ... validate="false">
      <forward name="load" path="/load.do"/>
      <forward name="insert" path="/insert.do"/>
      <forward name="update" path="/update.do"/>
      <forward name="delete" path="/delete.do"/>
   </action>

Hopefully this either helps or at least inspires someone else to tell us their preferred way of dealing with these sorts of situations.

-john.


Akos Maroy wrote:


basically what I need is a way of 'calling' A_input.do with a different set of ActionMapping, so that A_save.do on "success" would not go to A_show.do, but to B_addedA.do. is this possible somehow?


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to