// can process the event payload.
logger.debug("Invoking {0} for class=[{1}]", bridgeEventHandlerAttributeName,
bridgeEventHandler.getClass());
Event event = eventRequest.getEvent();
EventNavigationResult eventNavigationResult = bridgeEventHandler.handleEvent(facesContext, event);
if (eventNavigationResult != null) {
String oldViewId = facesContext.getViewRoot().getViewId();
String fromAction = eventNavigationResult.getFromAction();
String outcome = eventNavigationResult.getOutcome();
logger.debug("Invoking navigationHandler fromAction=[{0}] outcome=[{1}]", fromAction, outcome);
NavigationHandler navigationHandler = facesContext.getApplication().getNavigationHandler();
navigationHandler.handleNavigation(facesContext, fromAction, outcome);
String newViewId = facesContext.getViewRoot().getViewId();
bridgeRequestScope.setNavigationOccurred(!oldViewId.equals(newViewId));
}
// Save the faces view root and any messages in the faces context so that they can be restored during
// the RENDER_PHASE of the portlet lifecycle.
bridgeRequestScope.saveState(facesContext);
// Assume that the bridge request scope should be maintained from the EVENT_PHASE into the
// RENDER_PHASE by utilizing render parameters.
BridgeRequestScope.Transport bridgeRequestScopeTransport =
BridgeRequestScope.Transport.RENDER_PARAMETER;
Serializable eventPayload = event.getValue();
// FACES-1465: If the portlet developer intentionally wrapped the event payload is with an
// EventPayloadWrapper, then determine whether or not this is happening during a redirect. If this is
// the case, then the bridge request scope must be maintained from the EVENT_PHASE into the RENDER_PHASE
// by utilizing a portlet session attribute. This is because render parameters will not survive a