We have a page with some Accordions. Some accordions start as empty, and they get filled when the user clicks the Accordion bar through a partial update. At the start, this works fine, but if the user opens the accordions in a later stage it doesn't work.
It happens when the user leaves the accordions closed, switches to different page in the same nsf, does a lot of things there, and then comes back to the first page. Somehow, the code related to the partial refresh isn't executed.
Here's some code:
<xe:djAccordionPane id="djAccordionPane3">
<xp:div id="outerPanelModels">
<xc:ccModelView>
<xc:this.rendered><![CDATA[#{javascript:UserData.getVar("ShowModels")}]]></xc:this.rendered>
</xc:ccModelView>
</xp:div>
<xe:this.dojoAttributes>
<xp:dojoAttribute name="Title" value="#{javascript:constants.Models}"></xp:dojoAttribute>
</xe:this.dojoAttributes>
<xp:eventHandler event="onShow" submit="true" refreshMode="partial"
refreshId="outerPanelModels">
<xp:this.onComplete><![CDATA[hideAjaxLoader();]]></xp:this.onComplete>
<xe:this.script><![CDATA[if(document.getElementById("#{id:outerPanelModels}").childElementCount==0) {
showAjaxLoader();
return true
}
return false;]]></xe:this.script>
<xe:this.action><![CDATA[#{javascript:UserData.putVar("ShowModels", true)}]]></xe:this.action>
</xp:eventHandler>
</xe:djAccordionPane>
UserData is a sessionScope bean. putVar and getVar used to be in a viewScope bean, I suspected the bean to be destroyed somehow (it actually is) so I moved the code over to sessionScope.
Why isn't the code line at the bottom executed, i.e. the line with UserData.putVar("ShowModels", true)?? Any clues? A solution maybe??
Thanks!
Update The application is set to keep all pages in memory.
xsp.properties:
xsp.error.page=xError.xsp
xsp.library.depends=com.ibm.xsp.extlib.library
xsp.min.version=8.5.3
xsp.persistence.mode=basic
xsp.resources.aggregate=false
xsp.theme.web=extendOneUI.theme
xsp.openlog.expireDate=15
xsp.error.page=Error.xsp
xsp.persistence.viewstate=fullstate
# org.openntf.domino.xsp=godmode,marcel,bubbleExceptions
xsp.application.forcefullrefresh=true
xsp.error.page.default=true
xsp.session.timeout=180
xsp.application.timeout=180