I'm wondering if it is possible to 'nest' a struts action into another. Here's what I'm thinking about:
Suppose I have a form for inserting some data (of type A), and that it works the following way. There are three actions involved, namely:
A_input.do: displays the input form, with the form action set to A_save.do
A_save.do: - saves the input data and sends a redirect to A_show.do with
the id of the saved data (forwards to "success")
- on validation errors, redirects to A_input.doA_show.do: - shows the data with id supplied
(loads data based on the id directly from the persistent
store, does not use FormBean data)now let's suppose that I have another page, where I want to have the possibility of 'nesting' the above input method. let's suppose that I have some type B, for which one or more of type A may be added. for this, I need to get input for data type A, and after it has been saved properly, have to get the id of the newly saved A, so that I can associate it with B. this would look like:
B_show.do: displays information on data of type B, with a link for the possibility of 'adding data of type A to B', linking to A_input.do
suppose I simply forward to A_input.do, but then after proper data input it would end up at A_show.do, which is not good. what I need is that it should 'come back' to:
B_addedA.do: after a successful new insert of A, and the id of this A,
this action associates this new A with B. then redirects to
B_show.dobasically 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]

