diff options
Diffstat (limited to 'test/uscxml/test-xhtml-invoker.scxml')
-rw-r--r-- | test/uscxml/test-xhtml-invoker.scxml | 147 |
1 files changed, 0 insertions, 147 deletions
diff --git a/test/uscxml/test-xhtml-invoker.scxml b/test/uscxml/test-xhtml-invoker.scxml deleted file mode 100644 index 3a868a9..0000000 --- a/test/uscxml/test-xhtml-invoker.scxml +++ /dev/null @@ -1,147 +0,0 @@ -<scxml datamodel="ecmascript" name="comet-test" - xmlns:html="http://www.w3.org/1999/xhtml" - xmlns="http://www.w3.org/2005/07/scxml"> - - <script src="http://uscxml.tk.informatik.tu-darmstadt.de/scripts/dump.js" /> - - <script> - var entered = {}; - </script> - - <state id="noBackChannelInlineDOM"> - <invoke type="xhtml" id="xhtml4"> - <!-- provide initial content as a inline DOM --> - <content> - <html:p>We can never get this data into SCXML, just wait 3s!</html:p> - <html:form id="form1"> - First name1: <html:input type="text" name="firstname" /><html:br /> - Last name1: <html:input type="text" name="lastname" /> - <html:input type="submit" value="Submit" /> - </html:form> - </content> - <finalize> - <script>dump(_event);</script> - </finalize> - </invoke> - - <onentry> - <send event="continue" delay="3s" /> - </onentry> - - <transition event="continue" target="backChannelDomOPContent" /> - </state> - - <state id="backChannelDomOPContent"> - <invoke type="xhtml" id="xhtml3"> - <!-- provide initial content as a DOM operation, this will load the template for backchanneling via _parent --> - <content type="replacechildren" xpath="/html/body"> - <html:p>Enter some details to continue!</html:p> - <html:form id="form1" onsubmit="_parent.send('form.submitted', [ document.forms['form1'].elements[0].value, document.forms['form1'].elements[1].value ]); return false;"> - First name1: <html:input type="text" name="firstname" /><html:br /> - Last name1: <html:input type="text" name="lastname" /> - <html:input type="submit" value="Submit" /> - </html:form> - </content> - <finalize> - <script>dump(_event);</script> - </finalize> - </invoke> - - <transition event="form.submitted"> - <script> - entered.first = _event.data[0]; - entered.second = _event.data[1]; - </script> - <send target="#_xhtml3"> - <!-- replace children in body by a form and register onclick on submit button --> - <content type="replacechildren" xpath="/html/body"> - <html:p>Thank you!</html:p> - </content> - </send> - <send event="continue" delay="1000ms" /> - </transition> - - <transition event="continue" target="backChannelNoContent" /> - - </state> - - <state id="backChannelNoContent"> - <!-- without a src and no content, we invoke with a back channel via template/xhtml-invoker.xhtml for later sends --> - <invoke type="xhtml" id="xhtml2"> - <finalize> - <script>dump(_event);</script> - </finalize> - </invoke> - - <state id="waitForStabilize"> - <onentry> - <send event="continue" delay="10ms" /> - </onentry> - <transition event="continue" target="backChannelNoContentInitContent" /> - </state> - - <state id="backChannelNoContentInitContent"> - <onentry> - <!-- template initialized empty body and the scxml session --> - <send target="#_xhtml2"> - <!-- replace children in body by a form and register onclick on submit button --> - <content type="replacechildren" xpath="/html/body"> - <html:p>Enter some more details to continue!</html:p> - <html:form id="form1" onsubmit="_parent.send('form.submitted', [ document.forms['form1'].elements[0].value, document.forms['form1'].elements[1].value ]); return false;"> - First name1 (${entered.first}): <html:input type="text" name="firstname" /><html:br /> - Last name1 (${entered.second}): <html:input type="text" name="lastname" /> - <html:input type="submit" value="Submit" /> - </html:form> - </content> - </send> - </onentry> - - <transition event="form.submitted"> - <send target="#_xhtml2"> - <!-- replace children in body by a form and register onclick on submit button --> - <content type="replacechildren" xpath="/html/body"> - <html:p>Thank you!</html:p> - </content> - </send> - <send event="continue" delay="1000ms" /> - </transition> - - <transition event="continue" target="arbitraryURL" /> - - </state> - </state> - - <state id="arbitraryURL"> - <!-- simply open some arbitrary URL, we cannot communicate with these --> - <invoke src="http://www.heise.de" type="xhtml" id="xhtml1"> - <finalize> - <script>dump(_event);</script> - </finalize> - </invoke> - <onentry> - <!-- we need a delayed send for this to be a stable configuration for the invoker --> - <send event="continue" delay="10ms" /> - </onentry> - <transition event="continue" target="quit" /> - </state> - - - - <!-- <invoke type="xhtml" id="xhtml1"> - </invoke> --> - - <!-- state id="idle"> - <transition target="idle" event="onmouseover"> - <log expr="dump(_event)" /> - </transition> - <transition target="idle" event="onclick" cond="_event.origin=='xhtml1'"> - <send target="#_xhtml1"> - <content type="lastchild" xpath="/html/body"> - <html:p>Thank you!</html:p> - </content> - </send> - </transition> - </state --> - - <final id="quit" /> -</scxml>
\ No newline at end of file |