OpenNTF / POI4Xpages

Apache License 2.0
12 stars 4 forks source link

After Export of a Excle / Word the site is not responsive... any handels to close? #6

Open guedeWebGate opened 11 years ago

guedeWebGate commented 9 years ago

XSP.allowSubmit() in the JavaScript part of an action

dregos commented 9 years ago

Where exactly do we have to put XSP.allowSubmit()? Can you post an example code of action please? I've put it in addOnLoad script, then on the action I've put it in onStart, OnComplete and it doesn't work.

here is my code

                <xp:button id="buttonExportToXLSX"
                    disableTheme="true" styleClass=""
                    value="Export to XLSX">

                    <xp:eventHandler event="onclick" submit="true"
                        refreshMode="complete"
                        refreshId="">
                        <xp:this.action>
                            <xp:actionGroup>
                                <wgpoi:generateWorkbook>
                                    <xc:this.workbookId><![CDATA[${javascript:compositeData.poiSpreadSheetID }]]></xc:this.workbookId>
                                </wgpoi:generateWorkbook>
                                <xp:executeScript>
                                    <xp:this.script><![CDATA[#{javascript: return "";}]]></xp:this.script>
                                </xp:executeScript>
                            </xp:actionGroup>
                        </xp:this.action>
                        <xp:this.onStart>
                            <![CDATA[ 
                                XSP.allowSubmit();
                            ]]>
                        </xp:this.onStart>
                        <xp:this.onComplete>
                            <![CDATA[
                                XSP.allowSubmit();
                            ]]>
                        </xp:this.onComplete>
                    </xp:eventHandler>
                </xp:button>
guedeWebGate commented 9 years ago

Please use instead of xs:this.complete or xp:this.onStart the following:

        <xp:this.script><![CDATA[XSP.allowSubmit()]]></xp:this.script>