Question

I have a button in an Xpage with an OnClick event that does the following:

    var viewPanel=getComponent("viewPanel1");
    var docIDArray=viewPanel.getSelectedIds();
    sessionScope.put("searchDocIDArray",docIDArray);
    var url="exportData.xsp";
    context.redirectToPage(url, false);

The exportData page is not rendered but just has some code to write out an Excel file. In the client sometimes it does this and sometimes it does nothing and sometimes it writes over the current Xpgage and is just blank. I think what I need to do is to just launch that page in a new window? I am not sure.

It works on the web every time.

Was it helpful?

Solution

What version is your client?

Another approach you can try is opening your xagent with a window.open () in the onComplete event of your button. I don't remember off the top of my head if that works in xpinc. The advantage of this is your export will open in a new tab.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top