I just use a series of ordinary panel then build a navigator to select the panel I want to display. The click on the link in the navigator sets a viewScope variable that computes the style of the panel and sets display:none when appropriate. You should not need it to be a sessionScope because you should always be in the same view. In any case below is a shell of a panel that I use as a starting point in all my development. Copy it into a custom control then load the control onto your XPage when appropriate.
<?xml version="1.0" encoding="UTF-8"?>
<xp:view xmlns:xp="http://www.ibm.com/xsp/core" xmlns:xc="http://www.ibm.com/xsp/custom"
xmlns:xe="http://www.ibm.com/xsp/coreex">
<div class="panel panel-default">
<div class="panel-heading">
<div class="container-fluid">
<div class="row">
<div class="col-sm-9 col-md-6">
<ul class="nav nav-pills">
<li role="presentation">
<xp:link id="headerLink" text="Header">
<xp:this.attrs>
<xp:attr name="data-toggle" value="tab">
</xp:attr>
</xp:this.attrs>
<xp:eventHandler event="onclick" submit="true"
refreshMode="partial" refreshId="panelMain">
<xp:this.action><![CDATA[#{javascript:viewScope.vsSelectedDocMenu = "headerLink"
viewScope.vsShowPanel = "Header"}]]></xp:this.action>
</xp:eventHandler>
</xp:link>
</li><!-- li role= -->
<li role="presentation">
<xp:link id="attachmentLink" text="Attachments">
<xp:this.attrs>
<xp:attr name="data-toggle" value="tab">
</xp:attr>
</xp:this.attrs>
<xp:eventHandler event="onclick" submit="true"
refreshMode="partial" refreshId="panelMain">
<xp:this.action><![CDATA[#{javascript:viewScope.vsSelectedDocMenu = "attachmentLink"
viewScope.vsShowPanel = "Attachments"}]]></xp:this.action>
</xp:eventHandler>
</xp:link>
</li><!-- li role= -->
<li role="presentation">
<xp:link id="infoReqLink" text="Information Request">
<xp:this.attrs>
<xp:attr name="data-toggle" value="tab">
</xp:attr>
</xp:this.attrs>
<xp:eventHandler event="onclick" submit="true"
refreshMode="partial" refreshId="panelMain">
<xp:this.action><![CDATA[#{javascript:viewScope.vsSelectedDocMenu = "infoReqLink"
viewScope.vsShowPanel = "InfoReq"}]]></xp:this.action>
</xp:eventHandler>
</xp:link>
</li><!-- li role= -->
<li role="presentation">
<xp:link id="historyLink" text="History">
<xp:this.attrs>
<xp:attr name="data-toggle" value="tab">
</xp:attr>
</xp:this.attrs>
<xp:eventHandler event="onclick" submit="true"
refreshMode="partial" refreshId="panelMain">
<xp:this.action><![CDATA[#{javascript:viewScope.vsSelectedDocMenu = "historyLink"
viewScope.vsShowPanel = "History"}]]></xp:this.action>
</xp:eventHandler>
</xp:link>
</li><!-- li role= -->
</ul><!-- class nav -->
</div><!-- col -->
</div><!-- main row -->
</div><!-- container-fluid -->
</div><!-- panel-heading -->
<xp:panel id="panelMain">
<div class="panel-body">
<xp:panel id="panelHeader">
<xp:this.style><![CDATA[#{javascript:if (!viewScope.containsKey("vsShowPanel")){
viewScope.vsShowPanel = "Header";
}
var showPanel:String = viewScope.vsShowPanel;
(showPanel == "Header" ) ? "" : "display:none";
}]]></xp:this.style>
<div class="container-fluid">
Header
</div><!-- panelHeader container-fluid -->
</xp:panel><!--panelHeader-->
<xp:panel id="panelAttachments">
Attachments
</xp:panel><!-- panelAttachments -->
<xp:panel id="panelHistory">
History
<xp:this.style><![CDATA[#{javascript:(viewScope.vsShowPanel == "History") ? "" : "display:none"}]]></xp:this.style>
</xp:panel><!-- panelHistory -->
<xp:panel id="panelInfoReq">
<xc:ccWFSInfoRequest>
<xc:this.linkKey><![CDATA[#{javascript:WFSMainDoc.getValue("LinkKey")}]]></xc:this.linkKey>
</xc:ccWFSInfoRequest>
<xp:this.style><![CDATA[#{javascript:(viewScope.vsShowPanel == "InfoReq") ? "" : "display:none"}]]></xp:this.style>
</xp:panel>
</div><!-- panel-body -->
</xp:panel><!-- panelMain -->
</div><!-- class=panel -->
<xp:eventHandler event="onClientLoad" submit="false">
<xp:this.script><![CDATA[
var selectedPillId = "#{javascript:getClientId(viewScope.vsSelectedDocMenu ? viewScope.vsSelectedDocMenu : 'headerLink')}"
document.getElementById(selectedPillId).parentNode.className = "active"]]></xp:this.script>
</xp:eventHandler>
</xp:view>