无法编辑从 xpages 的对话框控件中的视图启动的文档

Can't edit a document launched from a view in a dialog control in xpages

我有一个 XPages 视图,第一列是 link 以启动该行的文档。我在对话框控件中启动它,它工作得很好,但它不允许我编辑文档。我在对话框控件上有一个编辑按钮,可以将其置于编辑模式,但它似乎不起作用。

有两种数据源,一种用于视图,一种用于文档。

XPage:

<?xml version="1.0" encoding="UTF-8"?>

<xc:NewMainForm><xp:this.facets><xc:NewLogin xp:key="facet_Login "></xc:NewLogin>
<xc:FooterContent xp:key="facet_Footer"></xc:FooterContent>
<xc:HomeBodyContent xp:key="facet_Body"></xc:HomeBodyContent>
<xc:MenuContainer xp:key="facet_Menu"></xc:MenuContainer>
<xc:cc_headerRightContent xp:key="facet_HeaderRight"> 
</xc:cc_headerRightContent>
<xc:cc_headerCenterContent xp:key="facet_HeaderCenter"> 
</xc:cc_headerCenterContent>
<xc:cc_headerLeftContent xp:key="facet_HeaderLeft"> 
</xc:cc_headerLeftContent>
<xc:NewLogin xp:key="facet_Login"></xc:NewLogin></xp:this.facets> 
</xc:NewMainForm></xp:view>

自定义控件:

<?xml version="1.0" encoding="UTF-8"?>
<xp:view xmlns:xp="http://www.ibm.com/xsp/core"
xmlns:xe="http://www.ibm.com/xsp/coreex"
style="background-repeat:no-repeat;background-position:center center"
xmlns:xc="http://www.ibm.com/xsp/custom">

<xp:this.resources>
    <xp:script src="/xspDialog.js" clientSide="true"></xp:script>
    <xp:styleSheet href="/Style.css"></xp:styleSheet>
</xp:this.resources>
<xp:panel>
    <xp:inputText id="Search" value="#{viewScope.searchString}"> 
</xp:inputText>
    <xp:button value="Search" id="button1"
        style="background-color:rgb(57,88,137);color:rgb(255,255,255)">
        <xp:eventHandler event="onclick" submit="true"
            refreshMode="partial" refreshId="viewPanel1">
        </xp:eventHandler>
    </xp:button>
</xp:panel>

<!--    VIEW PANEL -->

<xp:viewPanel id="viewPanel1" pageName="/ByAcronym.xsp"
    viewStyle="width:100%;background- 
image:url(Music1+Big+twice+Faded.png);background-repeat:no- 
repeat;background-position:center center;border-width:thick"
    var="thisentry" rows="27">

    <xp:this.facets>
        <xp:pager partialRefresh="true" layout="Previous Group Next"
            xp:key="headerPager" id="pager1">
        </xp:pager>
        <xp:viewTitle xp:key="viewTitle" id="viewTitle1"
            value="By Title" style="color:rgb(255,128,0);font-weight:bold">
        </xp:viewTitle>

        <xp:pager partialRefresh="true" layout="Previous Group Next"
            xp:key="footerPager" id="pager2">
        </xp:pager>
    </xp:this.facets>

    <xp:this.data>
        <xp:dominoView viewName="Songs" var="dsSongs"
            ignoreRequestParams="true">
            <xp:this.search><![CDATA[#{javascript:return 
 viewScope.get("searchString")}]]></xp:this.search>
        </xp:dominoView>
    </xp:this.data>

    <!-- VIEWCOLUMN1 -->

    <xp:viewColumn columnName="Title" id="viewColumn1"
        displayAs="link" style="width: 750px">
        <xp:eventHandler event="onclick" submit="true"
            refreshMode="partial" refreshId="dialog1" id="eventHandler1">
            <xp:this.action>
                <![CDATA[#{javascript:viewScope.UNID = 
 thisentry.getDocument().getUniversalID();
 getComponent('dialog1').show()}]]>
            </xp:this.action>
        </xp:eventHandler>

        <xp:viewColumnHeader value="Title" id="viewColumnHeader1">
        </xp:viewColumnHeader>
    </xp:viewColumn>
    <xp:viewColumn columnName="MusicType" id="viewColumn2">
        <xp:viewColumnHeader value="Music  Type"
            style="width: 250px" id="viewColumnHeader2">
        </xp:viewColumnHeader>
    </xp:viewColumn>
    <xp:viewColumn columnName="ComposedBy" id="viewColumn3">
        <xp:viewColumnHeader value="Composer"
            id="viewColumnHeader3">
        </xp:viewColumnHeader>
    </xp:viewColumn>
    <xp:viewColumn columnName="ArrangedBy"
        id="viewColumn4">
        <xp:viewColumnHeader value="Arranger"
            id="viewColumnHeader4">
        </xp:viewColumnHeader>
    </xp:viewColumn>
    <xp:viewColumn columnName="Jonra" id="viewColumn5">
        <xp:viewColumnHeader value="Jonra"
            id="viewColumnHeader5">
        </xp:viewColumnHeader>
    </xp:viewColumn>
    <xp:viewColumn columnName="Seasonal" id="viewColumn6">
        <xp:viewColumnHeader value="Seasonal"
            id="viewColumnHeader6">
        </xp:viewColumnHeader>
    </xp:viewColumn>
    <xp:viewColumn id="viewColumn7" columnName="Location"
        style="width:75px">
        <xp:this.facets>
            <xp:viewColumnHeader xp:key="header"
                id="viewColumnHeader7" value="Location" style="width:750px">
            </xp:viewColumnHeader>
        </xp:this.facets>
    </xp:viewColumn>
    <xp:viewColumn id="viewColumn8" columnName="NumberOfCopies"
        style="width:10.0px">
        <xp:this.facets>
            <xp:viewColumnHeader xp:key="header"
                id="viewColumnHeader8" value="Number Of Copies"
                style="width:750px">
            </xp:viewColumnHeader>
        </xp:this.facets>
    </xp:viewColumn>
 </xp:viewPanel>

 <!-- DIALOG1-->

 <xe:dialog id="dialog1" title="Details">
    <xe:dialogContent id="dialogContent1">
        <xp:panel
            style="width:698.0px;background- 
 image:url(Music1+Big+twice+Faded.png);background-repeat:no- 
 repeat;background-position:center center;border- 
 color:rgb(57,88,137);border-style:solid;border- 
 width:thin;color:rgb(33,51,80)">

            <xp:this.data>
                <xp:dominoDocument var="document1"
                    formName="MusicForm" action="editDocument"
                    documentId="#{javascript:viewScope.UNID}"
                    ignoreRequestParams="true">
                </xp:dominoDocument>
            </xp:this.data>
            <xp:table>
                <xp:tr>
                    <xp:td>
                        <xp:label value="Music Type:"
                            id="musicType_Label1" for="musicType1"
                            style="font-weight:bold">
                        </xp:label>
                        <xp:br></xp:br>
                        <xp:inputText value="#{document1.MusicType}"
                            id="musicType1">
                        </xp:inputText>
                    </xp:td>
                    <xp:td>

                        <xp:label value="Title:" id="title_Label1"
                            for="title1" style="font-weight:bold">
                        </xp:label>
                        <xp:br></xp:br>
                        <xp:inputText value="#{document1.Title}"
                            id="title1">
                        </xp:inputText>
                    </xp:td>
                    <xp:td>
                        <xp:label value="Composed By:"
                            id="composedBy_Label1" for="composedBy1"
                            style="font-weight:bold">
                        </xp:label>
                        <xp:br></xp:br>
                        <xp:inputText value="#{document1.ComposedBy}"
                            id="composedBy1">
                        </xp:inputText>
                    </xp:td>
                    <xp:td>
                        <xp:label value="Arranged By:"
                            id="arrangedBy_Label1" for="arrangedBy1"
                            style="font-weight:bold">
                        </xp:label>
                        <xp:br></xp:br>
                        <xp:inputText value="#{document1.ArrangedBy}"
                            id="arrangedBy1">
                        </xp:inputText>
                    </xp:td>
                </xp:tr>
                <xp:tr>
                    <xp:td>

                        <xp:label value="Jonra:" id="jonra_Label1"
                            for="jonra1" style="font-weight:bold">
                        </xp:label>
                        <xp:br></xp:br>
                        <xp:inputText value="#{document1.Jonra}"
                            id="jonra1">
                        </xp:inputText>
                    </xp:td>
                    <xp:td>

                        <xp:label value="Season:"
                            id="seasonal_Label1" for="seasonal1" 
 style="font-weight:bold">
                        </xp:label>
                        <xp:br></xp:br>
                        <xp:inputText value="#{document1.Seasonal}"
                            id="seasonal1">
                        </xp:inputText>
                    </xp:td>
                    <xp:td>
                        <xp:label value="Location:"
                            id="location_Label1" for="location1" 
 style="font-weight:bold">
                        </xp:label>
                        <xp:br></xp:br>
                        <xp:inputText value="#{document1.Location}"
                            id="location1">
                        </xp:inputText>
                    </xp:td>
                    <xp:td>
                        <xp:label value="Number Of Copies:"
                            id="numberOfCopies_Label1" for="numberOfCopies1"
                            style="font-weight:bold">
                        </xp:label>
                        <xp:br></xp:br>
                        <xp:inputText
                            value="#{document1.NumberOfCopies}" 
 id="numberOfCopies1">
                        </xp:inputText>
                    </xp:td>
                </xp:tr>
                <xp:tr>
                    <xp:td colspan="4">



                        <xp:messages layout="table"
                            style="color:red" id="messages1">
                        </xp:messages>
                    </xp:td>



                </xp:tr>
                <xp:tr>
                    <xp:td colspan="4">
                        <xp:button id="button5" value="Save">



                            <xp:this.rendered><![CDATA[# 
 {javascript:if(document1.isNewNote()){
 false
 }else{
 true
 }}]]></xp:this.rendered>
                            <xp:eventHandler event="onclick"
                                submit="true" refreshMode="complete" 
 id="eventHandler5">
                                <xp:this.action>

                                    <xp:actionGroup>
                                        <xp:executeScript
                                            script="# 
 {javascript:document1.save()}">
                                        </xp:executeScript>
                                        <xp:openPage
                                            name="/Main.xsp">
                                        </xp:openPage>
                                    </xp:actionGroup>
                                </xp:this.action>
                            </xp:eventHandler>
                        </xp:button>
                        <xp:button id="button4" value="Submit">
                            <xp:this.rendered><![CDATA[# 
 {javascript:if(document1.isNewNote()){
 true
 }else{
 false
}}]]></xp:this.rendered>
                            <xp:eventHandler event="onclick"
                                submit="true" refreshMode="complete" 
immediate="false"
                                save="true" id="eventHandler2">
                                <xp:this.action>
                                    <xp:actionGroup>
                                        <xp:openPage
                                            name="/Main.xsp">
                                        </xp:openPage>
                                    </xp:actionGroup>
                                </xp:this.action>
                            </xp:eventHandler>
                        </xp:button>
                        <xp:button value="Edit" id="button2"
                            rendered="# 
 {javascript:!document1.isEditable()}">
                            <xp:eventHandler event="onclick"
                                submit="true" refreshMode="complete" 
id="eventHandler3">
                                <xp:this.action>
                                    <xp:changeDocumentMode
                                        mode="edit" var="document1">
                                    </xp:changeDocumentMode>
                                </xp:this.action>
                            </xp:eventHandler>
                        </xp:button>
                        <xp:button id="button3">
                            <xp:this.value><![CDATA[# 
 {javascript:if(document1.isEditable()){
 "Cancel"
 }else{
 "Close"
 }}]]></xp:this.value>
                            <xp:eventHandler event="onclick"
                                submit="true" refreshMode="complete" 
immediate="true"
                                save="false" id="eventHandler4">
                                <xp:this.action>
                                    <xp:openPage name="/Main.xsp">
                                    </xp:openPage>
                                </xp:this.action>
                            </xp:eventHandler>
                        </xp:button>
                    </xp:td>
                </xp:tr>
            </xp:table>
        </xp:panel>
    </xe:dialogContent>
</xe:dialog>
</xp:view>

我做错了什么?

兆焦耳

ACL 的高级选项卡上的

"Maximum Internet name and password" 可以限制访问。如果将其设置为例如Reader,Web 上应用程序允许的最高访问权限为 Reader 访问权限,无论个人的 ACL 设置如何。作者只允许他们创建,而不是编辑没有作者字段等的现有文档。