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

Simple Action: Open Page $$PreviousPage and download control

我有一个非常简单的编辑文档 XPage,一旦我在上面放置了上传和下载控件,它就不再起作用了。保存操作 (Speichern) 只有 2 个操作,保存文档和打开 $$PreviousPage.This 完美运行(我有 3 个数据视图,我从中调用页面)。当我现在按保存时,页面似乎 "flash",更改未保存,我返回到 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>

好的,以防其他人遇到类似问题。我所做的是将按钮设置为类型 "Submit" 并添加了 "Save document" 和 "Open page" 操作 - 这就是问题所在。一旦我将按钮设置为 "normal" 按钮,一切正常。希望这对其他人有帮助!