Dec 8, 2011, 10:05 AM
57 Posts

Re: After click Button that generate PDF..other button don't work

  • Category: Server Side JavaScript
  • Platform: All
  • Release: 8.5.3
  • Role: Developer
  • Tags: pdf,xpages,itext,button
  • Replies: 1
A working example NSF for download here:
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="">
    <xp:button value="Label" id="button1">
        <xp:eventHandler event="onclick" submit="true"

 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>
I have been trying to make a proxy servlet work instead of using an extra page as above
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