POI 4 XPages - creating documents only works once

Well, to be honest: the headline is not telling the truth. I use a custom control with several buttons (save, close, edit, etc.) And a button that performs a POI action - it generates a Word file. I had a problem: after pressing the POI button, my other buttons (and POI too) will no longer work, not a single click will start. Now strange: after waiting a few seconds (depending on which browser I use, Chrome is the fastest), I can press the buttons (all) again so that I can, for example. leave (close) or change my Xpage.

I don't know if this helps, but here is the event code of my POI button:

<xp:button id="button5" styleClass="btn btn-sm printbutton"
            style="display:none">
            <i class="fa fa-print"></i>
            &#160;
            <xp:text>
                <xp:this.value><![CDATA[#{javascript:"Nach MS Word exportieren"}]]></xp:this.value>
            </xp:text>

            <xp:eventHandler event="onclick" submit="true"
                refreshMode="complete">
                <xp:this.action>

                    <xp:actionGroup>
                        <xp_1:generateDocument documentId="wordprint"
                            loaded="true">
                        </xp_1:generateDocument>
                    </xp:actionGroup>
                </xp:this.action>
            </xp:eventHandler>
        </xp:button>

Any ideas how to avoid this behavior or is it a bug in POI 4 XPages?

BTW: Word, . script . xpages "".

!

+4
2

, JS- XSP.allowSubmit() , :

<xp:button id="button5" styleClass="btn btn-sm printbutton" style="display:none">
        <i class="fa fa-print"></i>
        &#160;
        <xp:text>
            <xp:this.value><![CDATA[#{javascript:"Nach MS Word exportieren"}]]></xp:this.value>
        </xp:text>

        <xp:eventHandler event="onclick" submit="true"
            refreshMode="complete">
            <xp:this.action>
                <xp:actionGroup>
                    <xp_1:generateDocument documentId="wordprint"
                        loaded="true">
                    </xp_1:generateDocument>
                </xp:actionGroup>
            </xp:this.action>
            <xp:this.script><![CDATA[XSP.allowSubmit()]]></xp:this.script>
        </xp:eventHandler>
    </xp:button>
+14

, , .

XAgent. XPage, XAgent, .

+2

Source: https://habr.com/ru/post/1528067/


All Articles