<return
namelist="variable1 ...">
event="event"/
eventexpr="js_expression"
message="String"
messageexpr="js_expression"
/>
Causes subdialog's execution context to terminate. You can use the <return> to pass back variable values from the subdialog's execution context and to propagate an event back to the calling dialog (for example, a no-match event).
To propagate an event back to the calling dialog, use the event attribute. For example:
<return event="nomatch"/>
If <return> is encountered in a dialog that is not executing as a subdialog, an error.semantic event is thrown.
The values returned with the namelist attribute are available to the calling dialog as properties of the <subdialog> input variable. They can be accessed using the following notation:
subdialogName.namelistVarible
For example, if a subdialog is invoked with:
<subdialog name="sub" .../>
<return namelist="a"/>
then the return value can be accessed as:
"sub.a"
| Parents | Children |
|
| | error.badfetch - Thrown if both event and namelist attributes are specified. |
| | VoiceXML 2.0 Specification: <return> |
| | Related tag: <subdialog> |
<?xml version="1.0" ?>
<!DOCTYPE vxml PUBLIC "-//BeVocal Inc//VoiceXML 2.0//EN"
"http://cafe.bevocal.com/libraries/dtd/vxml2-0-bevocal.dtd">
<vxml version="2.0" xmlns="http://www.w3.org/2001/vxml">
<form id="main">
<subdialog name="result" src="#subbie">
<param name="goodbye" value="goodbye"/>
</subdialog>
<block>
We're back from the sub dialog.
Result dot hello equals <value expr="result.hello"/>
Result dot goodbye equals <value expr="result.goodbye"/>
</block>
</form>
<form id="subbie"> <!-- This is the subdialog -->
<!-- This variable already has a value, -->
<!-- so it can't be initialized by caller -->
<var name="hello" expr="'hello'"/>
<!-- This variable is initialized by caller -->
<var name="goodbye"/>
<block>
This is the sub dialog.
<return namelist="hello goodbye"/>
</block>
</form>
</vxml>
| Café Home |
Developer Agreement |
Privacy Policy |
Site Map |
Terms & Conditions Part No. 520-0001-02 | © 1999-2007, BeVocal, Inc. All rights reserved | 1.877.33.VOCAL |