I have a traditional Notes application I am converting to XPages. In this application all of the XPages run the Page Load and Render Response events twice. I made a very simple XPage to illustrate this:
<?xml version="1.0" encoding="UTF-8"?>
<xp:view xmlns:xp="http://www.ibm.com/xsp/core">
<xp:this.beforePageLoad><![CDATA[#{javascript:print("db1 beforePageLoad");}]]></xp:this.beforePageLoad>
<xp:this.afterPageLoad><![CDATA[#{javascript:print("db1 afterPageLoad");}]]></xp:this.afterPageLoad>
<xp:this.afterRestoreView><![CDATA[#{javascript:print("db1 afterRestoreView");}]]></xp:this.afterRestoreView>
<xp:this.beforeRenderResponse><![CDATA[#{javascript:print("db1 beforeRenderResponse");}]]></xp:this.beforeRenderResponse>
<xp:this.afterRenderResponse><![CDATA[#{javascript:print("db1 afterRenderResponse");}]]></xp:this.afterRenderResponse>
</xp:view>
When this page is loaded in the browser the following is outputted to the server console:
My xsp settings are:
xsp.ajax.renderwholetree=false
xsp.client.script.radioCheckbox.ie.onchange.trigger=early-onclick
xsp.error.page.default=true
xsp.persistence.mode=file
xsp.resources.aggregate=true
xsp.user.timezone=true
xsp.html.doctype=html
xsp.theme.mobile.pagePrefix=m_
xsp.library.depends=com.ibm.xsp.extlib.library
xsp.theme=Bootstrap3
To ensure this isn't normal behavior I made a new, empty application and created the same XPage in it and set the same xsp settings. The XPage in the new application:
<?xml version="1.0" encoding="UTF-8"?>
<xp:view xmlns:xp="http://www.ibm.com/xsp/core">
<xp:this.beforePageLoad><![CDATA[#{javascript:print("beforePageLoad");}]]></xp:this.beforePageLoad>
<xp:this.afterPageLoad><![CDATA[#{javascript:print("afterPageLoad");}]]></xp:this.afterPageLoad>
<xp:this.afterRestoreView><![CDATA[#{javascript:print("afterRestoreView");}]]></xp:this.afterRestoreView>
<xp:this.beforeRenderResponse><![CDATA[#{javascript:print("beforeRenderResponse");}]]></xp:this.beforeRenderResponse>
<xp:this.afterRenderResponse><![CDATA[#{javascript:print("afterRenderResponse");}]]></xp:this.afterRenderResponse>
</xp:view>
When this page is loaded in the browser the output on the server console looks correct:
What would cause these events to execute twice?