I have a generic confirm page (it just tells the user that the action was completed, i.e. their data was saved), but I'm sure you could use the same idea.

In my "submit" action (the one that handles the form submission), I have two forwards:

<forward name="confirm" path="/WEB-INF/jsp/confirm.jsp"/>
<forward name="continue" path="/app/setup/normalUser" redirect="true"/>


"confirm" is the confirmation page, and "continue" is where the user should go after the confirmation page.

In my action:


// find the continue ActionForward, and save it's path in the request
ActionForward continueAf = mapping.findForward("continue");
WebUtil.setRequestAttribute(request, "continuePath", continueAf.getPath());


return mapping.findForward("confirm");


and in the confirmation jsp page there is a "continue" link:
<html:link hide="true" page="<%= (String) request.getAttribute("continuePath") %>">
<bean:message key="common.continue"/>
</html:link>


Instead of just a "continue" forward, you could have two: "ok" and "cancel". Then in the action store them both in the request, and the jsp page could have two links.

Hope that helps.




On Sunday, Aug 24, 2003, at 21:55 Canada/Eastern, Shane Mingins wrote:

Hi



I am wishing to create a generic OK/CANCEL type page that can be used by
different workflow situations.




Can anyone suggest a nice tidy way of doing this?



The way I see it is that somehow I need to dynamically define the ok/cancel
forwards from the page based on the page it is coming from.




Cheers

Shane





Shane Mingins

Analyst Programmer

Assure NZ Ltd

Ph 644 494 2522





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



Reply via email to