This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal



Dec 7, 2011, 1:12 PM
37 Posts

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
 This is my scenario:
 
I have a Xpages with 2 button 
 
1) Button that go in Edit Mode the Datasouce 
2) Button that create with Itext in fly the PDF (I have used this example Enkory code )
 
After that I press the 2nd button (PDF Create) the other button doesn't work... 
 
Have you any suggest? 
Dec 8, 2011, 3:05 PM
57 Posts
Re: After click Button that generate PDF..other button don't work
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

This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal