문제

나는 xpage가 여러 개의 탭을 가지고 있습니다.첫 번째 탭에는 isNewNote ()가 true 일 때만 컨텐츠가 편집 할 수있는 패널을 포함합니다.그래서 패널에 대한 읽기 전용 속성을 계산했습니다.

그러나 문서를 저장할 때마다 새로운 충돌 문서가 생성됩니다.

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