尝试在xPages中打开文档

时间:2016-03-15 14:19:14

标签: xpages

我在xPages中有一个订购系统。在主订单表单中,我接受客户信息作为document1,并将这些字段保存为fOrderForm(Form)。在同一页面上,我有一个视图控件,其中包含所有订购的项目,这些项目存储为与客户数据不同的文档。我可以将这些保存为新文档,没有任何问题。当我打开其中一个需要代码将viewScope变量设置为订单号的订单以便视图控件可以显示订单商品时,它会给我以下错误。我在编辑器上设置了Anonymous。我是xPages的新手。有人可以解释一下吗?

com.ibm.xsp.FacesExceptionEx: Could not open the document
    com.ibm.xsp.model.domino.DominoDocumentData.doOpenDocument(Unknown Source)
    com.ibm.xsp.model.AbstractDocumentDataSource.openDocument(Unknown Source)
    com.ibm.xsp.model.AbstractDocumentDataSource.load(Unknown Source)
    com.ibm.xsp.model.AbstractDataSource.getDataContainer(Unknown Source)
    com.ibm.xsp.model.domino.DominoDocumentData.getDataObject(Unknown Source)
    com.ibm.xsp.model.AbstractDataSource.pushData(Unknown Source)
    com.ibm.xsp.util.DataPublisher.publishControlData(Unknown Source)
    com.ibm.xsp.component.UIViewRootEx.publishControlData(Unknown Source)
    com.ibm.xsp.component.UIViewRootEx.initBeforeContents(Unknown Source)
    com.ibm.xsp.page.compiled.AbstractCompiledPage.initComponent(Unknown Source)
    com.ibm.xsp.page.compiled.AbstractCompiledPage.createTree(Unknown Source)
    com.ibm.xsp.page.compiled.AbstractCompiledPage.createViewRoot(Unknown Source)
    com.ibm.xsp.application.ViewHandlerExImpl._createViewRoot(Unknown Source)
    com.ibm.xsp.application.ViewHandlerExImpl.createViewRoot(Unknown Source)
    com.ibm.xsp.application.ViewHandlerExImpl.doCreateView(Unknown Source)
    com.ibm.xsp.application.ViewHandlerEx.createView(Unknown Source)
    com.ibm.xsp.webapp.FacesServlet.serviceView(Unknown Source)
    com.ibm.xsp.webapp.FacesServletEx.serviceView(Unknown Source)
    com.ibm.xsp.webapp.FacesServlet.service(Unknown Source)
    com.ibm.xsp.webapp.FacesServletEx.service(Unknown Source)
    com.ibm.xsp.webapp.DesignerFacesServlet.service(Unknown Source)
    com.ibm.designer.runtime.domino.adapter.ComponentModule.invokeServlet(Unknown Source)
    com.ibm.domino.xsp.module.nsf.NSFComponentModule.invokeServlet(Unknown Source)
    com.ibm.designer.runtime.domino.adapter.ComponentModule$AdapterInvoker.invokeServlet(Unknown Source)
    com.ibm.designer.runtime.domino.adapter.ComponentModule$ServletInvoker.doService(Unknown Source)
    com.ibm.designer.runtime.domino.adapter.ComponentModule.doService(Unknown Source)
    com.ibm.domino.xsp.module.nsf.NSFComponentModule.doService(Unknown Source)
    com.ibm.domino.xsp.module.nsf.NSFService.doServiceInternal(Unknown Source)
    com.ibm.domino.xsp.module.nsf.NSFService.access$0(Unknown Source)
    com.ibm.domino.xsp.module.nsf.NSFService$NsfServiceRequest.call(Unknown Source)
    com.ibm.domino.xsp.module.nsf.NSFService$NsfServiceRequest.call(Unknown Source)
    java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
    java.util.concurrent.FutureTask.run(Unknown Source)
    java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
    java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    java.lang.Thread.run(Unknown Source)
    com.ibm.domino.xsp.module.nsf.NSFService$NsfServiceThread.run(Unknown Source)
NotesException: Invalid universal id
    lotus.domino.local.Database.NgetDocumentByUNID(Native Method)
    lotus.domino.local.Database.getDocumentByUNID(Unknown Source)
    com.ibm.xsp.model.domino.DominoUtils.getDocumentById(Unknown Source)
    com.ibm.xsp.model.domino.DominoUtils.getDocumentById(Unknown Source)
    com.ibm.xsp.model.domino.DominoDocumentData.doOpenDocument(Unknown Source)
    com.ibm.xsp.model.AbstractDocumentDataSource.openDocument(Unknown Source)
    com.ibm.xsp.model.AbstractDocumentDataSource.load(Unknown Source)
    com.ibm.xsp.model.AbstractDataSource.getDataContainer(Unknown Source)
    com.ibm.xsp.model.domino.DominoDocumentData.getDataObject(Unknown Source)
    com.ibm.xsp.model.AbstractDataSource.pushData(Unknown Source)
    com.ibm.xsp.util.DataPublisher.publishControlData(Unknown Source)
    com.ibm.xsp.component.UIViewRootEx.publishControlData(Unknown Source)
    com.ibm.xsp.component.UIViewRootEx.initBeforeContents(Unknown Source)
    com.ibm.xsp.page.compiled.AbstractCompiledPage.initComponent(Unknown Source)
    com.ibm.xsp.page.compiled.AbstractCompiledPage.createTree(Unknown Source)
    com.ibm.xsp.page.compiled.AbstractCompiledPage.createViewRoot(Unknown Source)
    com.ibm.xsp.application.ViewHandlerExImpl._createViewRoot(Unknown Source)
    com.ibm.xsp.application.ViewHandlerExImpl.createViewRoot(Unknown Source)
    com.ibm.xsp.application.ViewHandlerExImpl.doCreateView(Unknown Source)
    com.ibm.xsp.application.ViewHandlerEx.createView(Unknown Source)
    com.ibm.xsp.webapp.FacesServlet.serviceView(Unknown Source)
    com.ibm.xsp.webapp.FacesServletEx.serviceView(Unknown Source)
    com.ibm.xsp.webapp.FacesServlet.service(Unknown Source)
    com.ibm.xsp.webapp.FacesServletEx.service(Unknown Source)
    com.ibm.xsp.webapp.DesignerFacesServlet.service(Unknown Source)
    com.ibm.designer.runtime.domino.adapter.ComponentModule.invokeServlet(Unknown Source)
    com.ibm.domino.xsp.module.nsf.NSFComponentModule.invokeServlet(Unknown Source)
    com.ibm.designer.runtime.domino.adapter.ComponentModule$AdapterInvoker.invokeServlet(Unknown Source)
    com.ibm.designer.runtime.domino.adapter.ComponentModule$ServletInvoker.doService(Unknown Source)
    com.ibm.designer.runtime.domino.adapter.ComponentModule.doService(Unknown Source)
    com.ibm.domino.xsp.module.nsf.NSFComponentModule.doService(Unknown Source)
    com.ibm.domino.xsp.module.nsf.NSFService.doServiceInternal(Unknown Source)
    com.ibm.domino.xsp.module.nsf.NSFService.access$0(Unknown Source)
    com.ibm.domino.xsp.module.nsf.NSFService$NsfServiceRequest.call(Unknown Source)
    com.ibm.domino.xsp.module.nsf.NSFService$NsfServiceRequest.call(Unknown Source)
    java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
    java.util.concurrent.FutureTask.run(Unknown Source)
    java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
    java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    java.lang.Thread.run(Unknown Source)
    com.ibm.domino.xsp.module.nsf.NSFService$NsfServiceThread.run(Unknown Source)

1 个答案:

答案 0 :(得分:1)

viewScope个变量不能用于某些dominoDocument数据源属性,例如documentId,如果它附加到XPage或自定义控件。我在最近的IBM Connect会议上讨论过这个问题,我将在下周的Engage上再次介绍它。

将其移至面板,您就可以了。