context.redirectToPage 只在 Notes Client 中间歇性地工作 [英] context.redirectToPage only works intermitently in Notes Client

查看:30
本文介绍了context.redirectToPage 只在 Notes Client 中间歇性地工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在 Xpage 中有一个按钮,带有执行以下操作的 OnClick 事件:

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);

exportData 页面不会呈现,但只有一些代码可以写出 Excel 文件.在客户端有时它会这样做,有时它什么都不做,有时它会覆盖当前的 Xpgage 并且只是空白.我想我需要做的就是在新窗口中启动该页面?我不确定.

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.

它每次都适用于网络.

推荐答案

您的客户是什么版本?

您可以尝试的另一种方法是在按钮的 onComplete 事件中使用 window.open () 打开您的 xagent.我不记得是否在 xpinc 中有效.这样做的好处是您的导出将在新选项卡中打开.

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.

这篇关于context.redirectToPage 只在 Notes Client 中间歇性地工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆