error in xforms-ready and xxforms:dialog

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

error in xforms-ready and xxforms:dialog

James Gu
I call a submission in xforms-ready and the submission fails. Then I found I can not open the dialog I put on page. Is there any relationship between xforms-ready and xxforms:dialog?
Also, it seems I can not show dialog in xforms-ready. Is there anyway to display it? I want to know how to use javascript to open the dialog.


        <xxforms:dialog id="error-dialog" appearance="full" level="modal"
                        close="true" draggable="true" visible="false">
            <xforms:label>Error Dialog</xforms:label>
            <xhtml:div id="dynamic-iframe-div" class="dynamic-iframe-div"/>
        </xxforms:dialog>

This is the trigger I added on page.
                     <xforms:trigger id="test-trigger">
                        <xforms:label>test</xforms:label>
                        <xforms:action ev:event="DOMActivate">
                            <xxforms:show dialog="error-dialog"/>
                        </xforms:action>
                    </xforms:trigger>
Reply | Threaded
Open this post in threaded view
|

Re: error in xforms-ready and xxforms:dialog

James Gu
More information:

In the submission in xforms-ready event. I added a xforms-sbumit-error action and wanted to display the dialog but it wasn't displayed. After that, I can not show this dialog in trigger (button) on page.

                <xforms:action ev:event="xforms-submit-error">
                    <xxforms:show dialog="error-dialog"/>
                </xforms:action>
Reply | Threaded
Open this post in threaded view
|

Re: error in xforms-ready and xxforms:dialog

James Gu
I use javascript to show the dialog in xforms-sbumit-error (The submission is called in xforms-ready) and it works well. Please let me know if ths will cause other problems.
Also, I wonder why <xxforms:show dialog="error-dialog"/>  doesn't work in xforms-ready while javascript works.

        <xforms:action ev:event="xforms-submit-error">
            <xxforms:script>
                ORBEON.xforms.Controls.showDialog('error-dialog', null);
            </xxforms:script>
        </xforms:action>

Thanks,
James