Hi This has all the making of a stupid question but here goes.
I have a page which can be accessed from many other pages. I want to implement a return button so that pressing it causes the page to forward back to where it came from.
I've thought of each start page having an action mapping with a parameter of the start path
e.g screen 1 submit maps to an action with a parameter of screen 1's path screen 2 submit maps to an action with a parameter of screen 2's path etc.
Setting a hidden field on the target screen and use this to get back to where you came from when you press the return button, e.g press return find the value of the hidden field and forward back to this!
Whew, is there a nicer way of doing this in struts?
When you implement the button as a submit button (e.g. <html:submit property="button"> you could add a value to it that contains the action path it's supposed to do. And you can fill that value by extracting it from the form property where you put in the action path on loading the page. So just use your form to store the different actions. Then in your action you can just read and execute required the action directly. Or am I just talking rubbish here?