【发布时间】:2019-02-14 05:18:11
【问题描述】:
enter image description hereHi 在我的 Xpages 应用程序中,我想参考存储在 NotesDocument 富文本字段(Notes Client 中的配置文档)中的 HTML,因此在 Xpages 数据源中我提到了 configDoc 作为 Notes Domino Document 的源,并且在 Default操作我将其设置为“打开文档”并在文档 ID 中“我将计算值设置如下”
var vw:NotesView = database.getView("vwConfig")
var doc:NotesDocument = vw.getFirstDocument()
var uniid:String = doc.getUniversalID();
return uniid
在我放置在 computedField 属性上的一个地方,我提到了 ssjs 代码
return configDoc.getValue("RTFIeldasHTML").getHTML();
这在我打开文档时有效,但在我打开现有文档时无效并且它给我一个错误:
Error while executing JavaScript computed expression
docConfig.getValue()' is null
【问题讨论】:
-
您不能使用未声明的变量,也不能在文档上使用 getValue()
-
它适用于新文档,但如果我打开现有文档则它不起作用。 configDoc 在 Xpages 数据源中声明为 opendocument,并作为上面计算代码提供的文档 id
-
什么是docConfig?
-
见主帖中的图片
标签: xpages