Am coming across an intermittent problem when opening an Xpage. I have a button on a dialog to open another XPage in a new browser window, the code in the button is
var path = facesContext.getExternalContext().getRequest().getContextPath();
var xpage = "Claim.xsp"
var fullpath = path + "/" + xpage;
var url = fullpath + "?action=openDocument&documentId="+ Action.claimDocID
view.postScript("window.open('" + url + "')"
(if anyone has another way instead of the view.postScript let me know, just couldn't figure out how to open in a new browser window)
Occasionally when the window opens I'll get an error - Could not open document, below is the entry in the log.
05/04/2017 08:26:10 AM HTTP JVM: CLFAD0131E: Unable to push data because: Could not open the document. For more detailed information, please consult error-log-0.xml located in C:/IBM/Domino/data/domino/workspace/logs 05/04/2017 08:26:10 AM HTTP JVM: com.ibm.xsp.webapp.FacesServlet$ExtendedServletException: com.ibm.xsp.FacesExceptionEx: Could not open the document
CLFAD0131E: Unable to push data because: Could not open the document com.ibm.xsp.FacesExceptionEx: Could not open the document at com.ibm.xsp.model.domino.DominoDocumentData.doOpenDocument(DominoDocumentData.java:529) at com.ibm.xsp.model.AbstractDocumentDataSource.openDocument(AbstractDocumentDataSource.java:148) at com.ibm.xsp.model.AbstractDocumentDataSource.load(AbstractDocumentDataSource.java:100) at com.ibm.xsp.model.AbstractDataSource.getDataContainer(AbstractDataSource.java:474) at com.ibm.xsp.model.domino.DominoDocumentData.getDataObject(DominoDocumentData.java:165) at com.ibm.xsp.model.AbstractDataSource.pushData(AbstractDataSource.java:576) at com.ibm.xsp.util.DataPublisher.publishControlData(DataPublisher.java:181) at com.ibm.xsp.component.UIViewRootEx.publishControlData(UIViewRootEx.java:1288) at com.ibm.xsp.component.UIViewRootEx.initBeforeContents(UIViewRootEx.java:1615) at com.ibm.xsp.page.compiled.AbstractCompiledPage.init
<-- is from the error-log-0.xml
BUT, when I press reload on the browser the page loads, so the URL is correct. I placed all sorts of print statements on the XPage, in the Java managed bean it also uses, and when the error occurs nothing is printed. The error is immediate, whereas when reloading it takes time and the messages are printed. After the first error, it doesn't occur again.
A couple of other things about this application, it is password protected, it is running on HTTPS. The XPage it loads does have a Notes document that's located in another database plus it uses a Managed bean. If anyone has any ideas be grateful.
Thanks
Cameron
答案 0 :(得分:0)
关于在新标签页中打开指定页面:您是否尝试使用链接控件而不是按钮?设置计算目标网址(最好在“所有属性&gt;&gt;数据&gt;&gt;值”下)并将目标属性设置为“_blank”(“所有属性&gt;&gt;基础&gt;&gt;目标”)
如果需要,可以稍后使用css修改链接,使其看起来像一个按钮。
Btw:一般情况下,如果你呆在同一个数据库中,则无需计算路径; XSPcontext将.nsf视为公共根。只需将您的网址指向“/ myNewPage.xsp”,然后相应地添加查询字符串,例如
var url = "/" + xpage + "?action=openDocument&documentId="+ Action.claimDocID
答案 1 :(得分:0)
当提供给select A
,B
,sum_C
from (select A
,B
,sum(C) as sum_C
,row_number () over
(
partition by A
order by sum(C) desc
) as rn
from TBL
group by A
,B
) t
where rn <= 2
URL参数的通用ID无效时,会发生此错误 - 可能是来自其他数据库或用户的文档无法访问它(读者字段)。
答案 2 :(得分:0)
只需使用带有target="_blank"
参数的链接:
<xp:link value="/my_page_name.xsp" text="to the infinity and beyond" target="_blank">
<xp:this.parameters>
<xp:parameter name="action" value="openDocument" />
<xp:parameter name="documentId" value="#{Action.claimDocID}" />
</xp:this.parameters>
</xp:link>
答案 3 :(得分:0)
我有同样的错误。就我而言,我是在共享元素中删除字段。恢复字段后,错误消失。