Reputation: 95
I'm trying to deploy "Building a Configurable and Extensible XPages Navigation" I found in THE VIEW (I'm a subscriber):
My design is very basic and traditional: two panels. In the left panel a Custom Control with the navigation as links. In the right panel an "Include Page" control for displaying XPages as a result of onclick events of the links in the left panel.
Problem: can't get the the right panel to update.
Have tried, in vain: passing sessionScope parameter with SSJS, partial updates, postScript with partialRefreshGet.
MY CODE: My "almost" working version - needs a manual refresh/reload to actually display the desired XPage in the right panel's "Include Page" control.
Link onclick: sessionScope.showPage = "xspByYear.xsp"; AND Partial Update of right panel.
Right panel's "Include Page" - pageName AND onClientLoad (with Home as default):
var tmp = sessionScope.showPage;
if (tmp == null){
"xspHome.xsp";
} else {
tmp;
}
Comment: All Properties/pageName had an "$" added, not allowed to change to "#": "... cannot be a run time binding."
Upvotes: 0
Views: 313
Reputation: 548
You can pass the "Include Page" control to a panel. Set an id to the panel and refresh the panel in the onclick event of the links (Partial Update).
<xp:panel id="panelToUpdate">
<xp:include pageName="/MyXPage.xsp" id="include1"></xp:include>
</xp:panel>
Upvotes: 0