FacesContext facesContext = FacesContext.getCurrentInstance();
String currentViewId = Pages.getViewId(facesContext);
if ( viewId!=null && currentViewId!=null )
{
ConversationIdParameter currentPage = Pages.instance().getPage(currentViewId).getConversationIdParameter();
ConversationIdParameter targetPage = Pages.instance().getPage(viewId).getConversationIdParameter();
if ( isDifferentConversationId(currentPage, targetPage) )
{
updateCurrentConversationId( targetPage.getConversationId() );
}
}
}