| A VFC method only accepts one VAction but I need to add many, how can I? |
| Categories: Audium OpenSDK |
| Article ID: | 210 |
| Last updated: | January 08, 2007 |
| User Opinions |
|
No users have voted.
|
|
Thank you for rating this answer.
|
SUMMARY
This article explains how VAction containers work, so that developers can add more than one VAction to Voice Foundation Class (VFC) containers that accept VActions.
SYMPTOMS
Developer is building a VoiceXML document using the VFCs. A VFC method accepts a VAction that will be added to the VoiceXML at runtime, but the developer needs to add multiple VActions. An example is the VIfGroup class, which accepts a VAction for use in an if-else block. It is often useful to execute multiple lines of VoiceXML (i.e. which are generated by VAction objects) within these blocks, rather than just a single line.
RESOLUTION
Although various VFC methods accept only a single VAction object reference, VAction objects are actually containers. You can add any number of additional VAction objects to a given VAction object to form a list of VActions. For example, if there is a VAction object named myVAction, one can add a second VAction named mySecondVAction to it by calling:
myVAction.add(mySecondVAction);
Now, myVAction can be passed to methods that accept a single VAction reference, and both VActions (myVAction and mySecondVAction) will be used to generate VoiceXML at runtime.
|
| Visitor Comments |
|
No visitor comments posted. Post a comment
|
| Attachments |
|
No attachments were found.
|