Xpages 简单操作:打开页面$$PreviousPage和下载控件

Xpages 简单操作:打开页面$$PreviousPage和下载控件,xpages,xpages-extlib,Xpages,Xpages Extlib,我有一个非常简单的编辑文档XPage,一旦我将上载和下载控件放在上面,它就不再工作了。保存操作(Speichern)只有两个操作:保存文档和打开$$PreviousPage。这非常有效(我有3个数据视图,从中调用页面)。当我现在按save时,页面似乎“闪烁”,更改未保存,我返回到EditDocument XPage。我没有看到任何错误。不太确定问题出在哪里:o( 代码如下: <?xml version="1.0" encoding="UTF-8"?> <xp:v

我有一个非常简单的编辑文档XPage,一旦我将上载和下载控件放在上面,它就不再工作了。保存操作(Speichern)只有两个操作:保存文档和打开$$PreviousPage。这非常有效(我有3个数据视图,从中调用页面)。当我现在按save时,页面似乎“闪烁”,更改未保存,我返回到EditDocument XPage。我没有看到任何错误。不太确定问题出在哪里:o(

代码如下:

    <?xml version="1.0" encoding="UTF-8"?>
    <xp:view xmlns:xp="http://www.ibm.com/xsp/core" xmlns:xc="http://www.ibm.com/xsp/custom">
        <xp:this.data>
            <xp:dominoDocument var="document1" formName="fmDoc" action="editDocument">
            </xp:dominoDocument>
        </xp:this.data>

        <xc:ccPageLayout>
            <xp:this.facets>
                <xp:panel xp:key="facetMiddle">

                    <xp:table>
                        <xp:tr>
                            <xp:td>
                                <xp:label value="Titel" id="titel_Label1" for="titel1">
                                </xp:label>
                            </xp:td>
                            <xp:td>
                                <xp:inputText value="#{document1.Titel}" id="titel1">
                                </xp:inputText>
                            </xp:td>
                        </xp:tr>
                        <xp:tr>
                            <xp:td>
                                <xp:label value="Datum" id="dokDatum_Label1" for="dokDatum1">
                                </xp:label>
                            </xp:td>
                            <xp:td>
                                <xp:inputText value="#{document1.dokDatum}" id="dokDatum1">
                                    <xp:dateTimeHelper id="dateTimeHelper1">
                                    </xp:dateTimeHelper>
                                    <xp:this.converter>
                                        <xp:convertDateTime type="date" dateStyle="short">
                                        </xp:convertDateTime>
                                    </xp:this.converter>
                                </xp:inputText>
                            </xp:td>
                        </xp:tr>

                        <xp:tr>
                            <xp:td>
                                <xp:label value="Kategorie" id="label3" for="kategorie1">
                                </xp:label>
                            </xp:td>
                            <xp:td>
                                <xp:comboBox id="kategorie1" value="#{document1.kategorie}">
                                    <xp:selectItems>
                                        <xp:this.value><![CDATA[#{javascript:var currDB:NotesDatabase = database;
    var profileDoc:NotesDocument=currDB.getProfileDocument("configDatabase","");
    var docUID=profileDoc.getItemValueString("kategorieDok");
    var categoryDoc:NotesDocument = currDB.getDocumentByUNID(docUID);
    var categories = categoryDoc.getItemValueString("kategorie");
    @Explode(@Text(categories), ";")
    }]]></xp:this.value>
                                    </xp:selectItems>
                                </xp:comboBox>

                            </xp:td>
                        </xp:tr>

                        <xp:tr>
                            <xp:td>
                                <xp:label value="Anhänge" id="label1" for="fileUpload1">
                                </xp:label>
                            </xp:td>
                            <xp:td>
                                <xp:fileUpload id="fileUpload1" value="#{document1.anhaenge}" useUploadname="true"></xp:fileUpload>
                            </xp:td>
                        </xp:tr>

                        <xp:tr>
                            <xp:td>
                                <xp:label value=" " id="label2" for="fileDownload1">
                                </xp:label>
                            </xp:td>
                            <xp:td>
                                <xp:fileDownload rows="5" id="fileDownload1" displayLastModified="false" value="#{document1.anhaenge}"
                                    hideWhen="true" displayType="false" displayCreated="false" allowDelete="true">
                                </xp:fileDownload>
                            </xp:td>
                        </xp:tr>



                        <xp:tr>
                            <xp:td colspan="2">
                                <xp:inputRichText id="inputRichText1" value="#{document1.body}">
                                </xp:inputRichText>
                            </xp:td>
                        </xp:tr>
                        <xp:tr>
                            <xp:td colspan="2">
                                <xp:button value="Abbrechen" id="button1">
                                    <xp:eventHandler event="onclick" submit="true" refreshMode="complete" immediate="true" save="false">
                                        <xp:this.action>
                                            <xp:openPage name="$$PreviousPage"></xp:openPage>
                                        </xp:this.action>
                                    </xp:eventHandler>
                                </xp:button>
                                <xp:button value="Speichern" id="button2">
                                    <xp:eventHandler event="onclick" submit="true" refreshMode="complete" immediate="false" save="true">
                                        <xp:this.action>

                                            <xp:actionGroup>
                                                <xp:saveDocument var="document1"></xp:saveDocument>


                                                <xp:openPage name="$$PreviousPage"></xp:openPage>
                                            </xp:actionGroup>
                                        </xp:this.action>
                                    </xp:eventHandler>
                                </xp:button>
                            </xp:td>
                        </xp:tr>


                    </xp:table>
                </xp:panel>
            </xp:this.facets>
        </xc:ccPageLayout>
    </xp:view>


好的,以防其他人有类似的问题。我所做的是将按钮设置为“提交”类型,并添加了“保存文档”和“打开页面”操作-这就是问题所在。只要我将按钮设置为“正常”按钮一切正常。希望这对其他人有帮助!

当然,我可以为每个数据视图创建一个EditDocument XPage,而不是使用$$PreviousPage直接使用视图,但对我来说似乎有点笨手笨脚!