0

I have a dialog in which user picks a record. After submitting, the transition runs a service, which loads data and then renders an output file.

<transition name="exportActiveBatch_LinkId" read-only="true">
    <actions>
        <service-call name="mantle.ledger.LedgerLoadingServices.runLinkId#Export" in-map="context+[batchId:batchIdPicker]" out-map="context" ignore-error="false"/>

        <if condition="hasError==true">
            <!--<message error="true">Error occurred '${errorMessage}'!</message>-->
            <log message="Error occurred '${errorMessage}'!" level="error"/>
            <else>
                <!--<message error="false">Export successful.</message>-->
                <log message="Export successful." level="info"/>
            </else>
        </if>
    </actions>

    <default-response type="none"/>
    <error-response url="."/>
</transition>

Everything works fine, data is loaded correctly, screen is rendered and output file is generated. The problem is, that the dialog does not close and remains in modal.

Log output

I would expect the dialog to close, but that does not happen. How shall I treat the transition responses correctly?

enter image description here

mrovnanik
  • 123
  • 9

1 Answers1

0

Normally container-dialog dialogs don't close automatically when a form in them is submitted, there can be multiple forms or for other reasons you don't want this. Most of the time you wouldn't notice it because when a form is submitted a new page is loaded.

A user can easily close the dialog by clicking outside it or on the 'x', but you could also add some JavaScript to do this if you want it done automatically. These are standard Bootstrap dialogs so you can use the documentation on getbootstrap.com as a reference.

David E. Jones
  • 1,721
  • 1
  • 9
  • 8