protected void executeActionResult(String finalLocation,
ActionInvocation invocation) {
LOG.debug("Executing result in Event phase");
ActionResponse res = PortletActionContext.getActionResponse();
Map sessionMap = invocation.getInvocationContext().getSession();
LOG.debug("Setting event render parameter: " + finalLocation);
if (finalLocation.indexOf('?") != -1) {
convertQueryParamsToRenderParams(res, finalLocation.substring(finalLocation.indexOf('?") + 1));
finalLocation = finalLocation.substring(0, finalLocation.indexOf('?"));
}
if (finalLocation.endsWith(".action")) {
// View is rendered with a view action...luckily...
finalLocation = finalLocation.substring(0, finalLocation
.lastIndexOf("."));
res.setRenderParameter(ACTION_PARAM, finalLocation);
} else {
// View is rendered outside an action...uh oh...
res.setRenderParameter(PortletActionConstants.ACTION_PARAM, "renderDirect");
sessionMap.put(RENDER_DIRECT_LOCATION, finalLocation);
}
res.setRenderParameter(MODE_PARAM, PortletActionContext
.getRequest().getPortletMode().toString());
}
Executes the action result. |