0

我有一个执行 dblookup 以获取 notesDocument 的按钮。我想将数据源设置为该文档,以便可以在我的 xpage 的其他地方使用它。

例如,我有三个不同的按钮作用于同一个文档。我不想在每个按钮中查找该文档。

我尝试将数据源 docUNID 设置为在执行 dblookup 的第一个按钮中更新的范围变量,然后刷新 xPage,但这似乎并没有更新数据源。

有什么想法吗?

4

1 回答 1

1

make sure your dblookup return a docunid and add your dblookup to the documentUniqueID property in the docment data source to the xpages and then use the data source variable to save or update values

There is a keyword on dblookup for getting the unid or you can return a column containing the unid

something like this

<xp:panel>
    <xp:this.data>
        <xp:dominoDocument var="doc" action="openDocument"
            documentId="#{javascript:@DbLookup(...)}">
        </xp:dominoDocument>
    </xp:this.data>
    <xp:button value="Label" id="button1">
        <xp:eventHandler event="onclick" submit="true"
            refreshMode="complete">
            <xp:this.action><![CDATA[#{javascript:doc.save()}]]></xp:this.action>
        </xp:eventHandler></xp:button>
    <xp:button value="Label" id="button2">
        <xp:eventHandler event="onclick" submit="true"
            refreshMode="complete">
            <xp:this.action><![CDATA[#{javascript:doc.save()}]]></xp:this.action>
        </xp:eventHandler></xp:button>
    <xp:button value="Label" id="button3">
        <xp:eventHandler event="onclick" submit="true"
            refreshMode="complete">
            <xp:this.action><![CDATA[#{javascript:doc.save()}]]></xp:this.action>
        </xp:eventHandler></xp:button>

于 2013-02-16T13:52:43.507 回答