質問

私は複数のタブを持つXPageを持っています。最初のタブには、ISNEWNote()がtrueの場合にのみ編集可能なパネルが含まれています。だから私はパネルのreadonly属性を計算しました。

しかし、私が文書を保存するたびに、それは新しい競合文書を作成しています。

Sametimeでは、読み取り専用プロパティをオフにしている場合は、競合しなくても正しく保存されます。

誰かがこの問題を解決するのを手伝ってくれる?

コード - XPAGE

<?xml version="1.0" encoding="UTF-8"?>
<xp:view xmlns:xp="http://www.ibm.com/xsp/core">

    <xp:this.data>
        <xp:dominoDocument var="document1"
            formName="frmOnboardingRequest">
        </xp:dominoDocument>
    </xp:this.data>
    <xp:panel>
        <xp:this.readonly><![CDATA[#{javascript:if(document1.isNewNote()){
    return false;
}else{
    return true;
}}]]></xp:this.readonly>
        <xp:table>
            <xp:tr>
                <xp:td>
                    <xp:label value="O n_ e d_ form completed by:"
                        id="oN_ED_FormCompletedBy_Label1" for="oN_ED_FormCompletedBy1">
                    </xp:label>
                </xp:td>
                <xp:td>
                    <xp:inputText
                        value="#{document1.ON_ED_EmployeeName}"
                        id="oN_ED_FormCompletedBy1">
                    </xp:inputText>
                </xp:td>
            </xp:tr>
        </xp:table></xp:panel>
    <xp:button value="Submit" id="button1"><xp:eventHandler event="onclick" submit="true" refreshMode="complete" immediate="false" save="true"></xp:eventHandler></xp:button></xp:view>
.

役に立ちましたか?

解決

同じ文書を指す複数のデータソースをチェックします。

同じ問題を抱えている前の投稿 xpage保存/送信

XPages

の複数のデータソース

Lotus Notes:同時に文書上で実行されているエージェントとユーザーによる複製の競合

==========================================================================================================================================================================================================================================================」である==

編集

私は同じ問題を得るためにボタンコードをこれに変更しなければなりませんでした

  <xp:button value="Submit" id="button1"><xp:eventHandler event="onclick" refreshMode="complete" submit="true">
    <xp:this.action>
        <xp:saveDocument></xp:saveDocument>
    </xp:this.action></xp:eventHandler></xp:button>
.

もう少しテストの後、これを試してください。

XPage

の末尾にこのフィールドを追加する
<xp:inputText id="inputText1"
        value="#{document1.temp}"
        style="visibility:hidden;display:none">
    </xp:inputText>
.

その後衝突は発生しません。

他のヒント

Strange indeed - but also not. Your data source is bound to the page and not to the panel. So if you want to set read mode only for that panel, consider to calculate the panel's datasource from the page's datasource:

<xp:panel>
    <xp:this.data>
        <xp:dominoDocument var="document1" action="openDocument"></xp:dominoDocument>
    </xp:this.data>
</xp:panel>

Of course you have to calculate the document mode and the docid instead of using the readonly property.

In addition to the other suggestions, when working with tabbed tables you will want to follow this blog post carefully. I have been through similar issues on a previous project and Tommy Valand's redirectToCurrentDocument() fixed them.

http://dontpanic82.blogspot.com/2010/06/xpages-avoid-saving-duplicate-documents.html

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top