PortletBridgeContext bridgeContext = PortletBridgeContext
.getCurrentInstance(facesContext);
if (null != bridgeContext) {
BridgeRequestScope windowState = bridgeContext.getRequestScope();
if (Contexts.isEventContextActive()) {
Manager manager = Manager.instance();
if (manager.isLongRunningConversation()) {
windowState.setConversationIdParameter(manager
.getConversationIdParameter());
windowState.setConversationId(manager
.getCurrentConversationId());
} else {
windowState.setConversationIdParameter(null);
windowState.setConversationId(null);
}