I have used the Dynamic Content Control with a Dynamic Page formula a fair bit but it has always been computed on page load and not changed. I have been working on a test where I want to select what page to display based on a combo box and an onChange event. I have done a full refresh as well as several different partial refreshes, but it appears that the page is only computed on the page load. The pages that this calls don't do anything but display "Page One" "Page Two" etc. The print statements only print from the initial page load. I have done a partial refresh of "customeControlInclude" "dynamicContentView" and a full Update in the onChange event of the Combo Box, but none of these cause the dynamicControlView to change the page loaded.
So my question is "Is there a way to cause the dynamic Content Control to recompute and display appropriate page?
<?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">
<xp:this.resources>
<xp:script src="/js Utils.jss" clientSide="false"></xp:script>
</xp:this.resources>
<xp:panel id="thisPage">
<xp:text escape="true" id="computedField1" value="#{sessionScope.ssSelectedView}"></xp:text>
 
<xp:br></xp:br>
<xp:br></xp:br>
<xp:comboBox id="comboBox1" value="#{sessionScope.ssSelectedView}"
style="width:20%">
<xp:selectItem itemLabel="Test One"></xp:selectItem>
<xp:selectItem itemLabel="Test Two"></xp:selectItem>
<xp:selectItem itemLabel="Test Three"></xp:selectItem>
<xp:selectItem itemLabel="Test Four">
</xp:selectItem>
<xp:eventHandler event="onchange" submit="true"
refreshMode="partial" refreshId="thisPage">
</xp:eventHandler>
</xp:comboBox>
<xp:br></xp:br>
<xp:panel id="panelView">
<xp:table>
<xp:tr>
<xp:td style="width:100.0%" valign="top">
<xe:dynamicContent id="dynamicContentView">
<xp:include id="customControlIncluder">
<xp:this.pageName>
<![CDATA[${javascript:try{
var debug:Boolean = true;
if (debug) print("Select Page in xpMainInput.xsp");
var viewName:String = sessionScope.ssSelectedView;
var page:String = null;
switch(viewName){
case "test One" :
page = "ccTestOne.xsp";
break;
case "Test Two" :
page = "ccTestTwo.xsp";
break;
case "Test Three" :
page = "ccTestThree.xsp";
break;
case "Test Four" :
page = "ccTestFour.xsp";
break
//Add additional case statements for each additional Application
}
if (page == null){
if (debug) print("Error in Main page is null ");
return "ccTestOne.xsp";
}else{
if (debug) print("xpMain page = " + page)
return page;
}
}catch(e){
print("Error Define Page in xpMain.xsp " + e.string());
}}]]>
</xp:this.pageName>
</xp:include>
</xe:dynamicContent>
</xp:td>
</xp:tr>
</xp:table>
</xp:panel>
</xp:panel>
</xp:view>