//First, try to get the conversation id from the request parameter defined for the page
String viewId = Pages.getCurrentViewId();
if ( viewId!=null )
{
Page page = Pages.instance().getPage(viewId);
storedConversationId = page.getConversationIdParameter().getRequestConversationId(parameters);
//isLongRunningConversation = false; //TODO: think about this further...
isLongRunningConversation = "true".equals( getRequestParameterValue(parameters, conversationIsLongRunningParameter) );
}
//Next, try to get the conversation id from the globally defined request parameter
if (storedConversationId==null)
{
storedConversationId = getRequestParameterValue(parameters, conversationIdParameter);
storedParentConversationId = getRequestParameterValue(parameters, parentConversationIdParameter);
isLongRunningConversation = "true".equals( getRequestParameterValue(parameters, conversationIsLongRunningParameter) );
}
if ( isMissing(storedConversationId) )
{
if ( Contexts.isPageContextActive() )
{
//if it is not passed as a request parameter,
//try to get it from the page context
org.jboss.seam.core.FacesPage page = org.jboss.seam.core.FacesPage.instance();
storedConversationId = page.getConversationId();
storedParentConversationId = null;
isLongRunningConversation = page.isConversationLongRunning();
//if (isLongRunningConversation==null) isLongRunningConversation = false;
}
}
else