You can take 2 approaches.
You can split the page into tiles, one tile contains the form input elements and is nested inside the other tile which contains the form and the buttons. Then you re-use the first tile and swop the second tile depending on your mapping.
Alternatively you can have a dispatch action. This would be the action of the submit, and it would direct execution within struts to your desired method within your action.
HTH Adam
On 09/29/2004 04:02 PM fjalvingh wrote:
I have no issue with the action: it indeed has no knowledge about the actual views being used which is OK. It means I'm able to re-use actions if I want to.
The JSP pages however seem to know way to much about navigation. They know this because they directly refer to an action path. This seems to make it impossible to re-use the same JSP page in a different context. As an example take a JSP page that is used to display a product. I should be able to use this page from a flow where all products are shown, and from a flow where products are searched, and from a flow where products are edited. The JSP page has a number of predefined "exits" like "previous", "next", "edit", "back". The presentations for these exits should be visible only for contexts where they have meaning (where they are mapped to some action).
To make this page reusable I need to be able to connect each "exit" to a different action depending on the context that the page is used in.
I would have expected that I could "wire" these entries using the action spec the page returns to. As I now start to understand this is possible but by hand- by making a special controller OR a new base class for Actions which uses a parameter to dispatch to a specified forward. But I still need to hard connect a JSP page to a controller as the target and this makes re-use of the page hardly possible. Am I right in this?
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]