1

我将“dbProfileDoc”定义为 ssjs 库中数据库配置文件的全局变量。我已经设法获取数据库配置文件,并且 dbProfileDoc.getItemValue(fieldname) 正在 AfterPageLoad 事件中工作。但是,当我尝试在提交按钮上使用 dbProfileDoc.getItemValue(fieldname) 来提交我的 xpage 时,我遇到了异常。dbProfileDoc 仍然存在,但在提交时无法访问任何字段值。有人请告诉我发生了什么吗?

4

1 回答 1

3

Notes objects can't be stored in a variable for so long because they are not serializable. You should store the values from Notes objects you need in variables and recycle the Notes objects right after it.

As an alternative, you can define your profile document as an additional data source for your XPage. Then you don't have to reread it every time you need it.

于 2013-09-04T21:22:51.197 回答