// save the return path in case the user clicks into a
// workflow. be sure to include the mode parameter.
try {
Portal tmpPortal = (Portal) request.getAttribute(AttrConstants.PORTAL_KEY);
if (tmpPortal.doWorkflow()) {
Map<String, String> params = tmpPortal.getWorkflowParams();
if (params == null) {
params = new HashMap<String, String>();
params.put(ParamConstants.MODE_PARAM, name);
}