xpages 文件的 UNID/为什么它会改变 [英] xpages UNID of documents / why it is changing
问题描述
我正在尝试根据 Cdoc UNID
链接 2 个文档(Cdoc
和 Pdoc
).
I'm trying to link 2 documents ( Cdoc
and Pdoc
) based on the Cdoc UNID
.
我有一个计算字段( computedfield3
),它绑定到一个具有默认值 @text(@documentuniqueid)
的表单'计算字段.Pdoc
位于我使用按钮显示的对话框中.
I have a computed field ( computedfield3
) which is binded to a form'computed field having the default value @text(@documentuniqueid)
. The Pdoc
is inside a dialog which I show it using a button.
该按钮包含 ID:computedField3
的 Partial Update
.
按钮代码:
if ( Cdoc.isNewNote() ) { Cdoc.save();
Cdoc.setValue("computedField3",Cdoc.getDocument().getUniversalID());
getComponent('exampleDialog').show() }
else
{
Cdoc.setValue("computedField3",Cdoc.getDocument().getUniversalID());
getComponent('exampleDialog').show()}
然后我使用自定义控件属性将 computedField3
值传递给 Pdoc
.
Then I pass the computedField3
value to Pdoc
using custom control properties.
我注意到如果我打开了一个现有的已经保存的 Cdoc
,打开它并从对话框中再次添加一个 Pdoc
,来自 Cdoc
的现有 UNID代码>正在改变......是来自部分更新吗?
I noticed if I opened an existing already saved Cdoc
, open it and add again a Pdoc
from the dialog, the existing UNID from the Cdoc
is changing... Is from the partial update?
我怎样才能让它好起来?
How can I make it OK ?
感谢您的时间
推荐答案
关键不是保存代码.它是 dominoDocument 数据源定义.请在此处查看我的最新评论 xpages 保存/取消操作方案
The key is not the save code. It's the dominoDocument datasource definition. Please see my latest comment here xpages save / cancel actions scenario
将 ignoreRequestParams 设置为 true 并且不计算 documentId,您总是在处理一个新文档.
With ignoreRequestParams set to true and no documentId computed, you're always working on a new document.
这篇关于xpages 文件的 UNID/为什么它会改变的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!