A working example NSF for download here:
http://www.lotususergroup.org/glug.nsf/ef61d6610bf536f886256fcc006a0098/902de37200ef69b0862577840040e7a7?OpenDocument
the reason all buttons become invalid is that you are using server
side function on the second button opening the export page. Once server
side submit is made, current page is submitted to go through JSF
lifecycle and render response is never invoked on the current page( If
you have phase listener, you will see that ) without rendering response,
the current page are destroyed.try this
<?xml version="1.0" encoding="UTF-8"?>
<xp:view xmlns:xp="http://www.ibm.com/xsp/core">
<xp:button value="Label" id="button1">
<xp:eventHandler event="onclick" submit="true"
refreshMode="norefresh">
<xp:this.action><![CDATA[#{javascript:facesContext.responseComplete();}]]></xp:this.action>
</xp:eventHandler>
</xp:button>
</xp:view>
-----------------------------------
Change your second button to something like this then it should work
<xp:button value="Export" id="button2">
<xp:eventHandler event="onclick" submit="false">
<xp:this.script><![CDATA[document.location = "ExportSomething.xsp"]]></xp:this.script>
</xp:eventHandler>
</xp:button>
I have been trying to make a proxy servlet work instead of using an extra page as above
/Extlib/XPagesSBT.nsf/xsp/.proxy/ping
but after reading Niklas Heidloff's Sample servlet
and updateSite.nsf + the proxy API in extension library, I still can't
pull things together, to create our own servlet and make it OSGI bundle
being loaded when server is started is something new for me. So If
anyone go through this, please give me a hand here to kick start
regards
wei