org.jvoicexml.interpreter
Interface FormItem

All Superinterfaces:
DialogConstruct, FormItemVisitable
All Known Implementing Classes:
AbstractFormItem, BlockFormItem, ControlItem, FieldFormItem, InitialFormItem, InputItem, ObjectFormItem, RecordFormItem, SubdialogFormItem, TransferFormItem

public interface FormItem
extends FormItemVisitable, DialogConstruct

Form items are the elements that can be visited in the main loop of the form interpretation algorithm. Input items direct the FIA to gather a result for a specific element. When the FIA selects a control item, the control item may contain a block of procedural code to execute, or it may tell the FIA to set up the initial prompt-and-collect for a mixed initiative form.

Since:
0.4
Version:
$Revision: 222 $

Copyright © 2006-2007 JVoiceXML group - http://jvoicexml.sourceforge.net/

Author:
Dirk Schnelle
See Also:
FormInterpretationAlgorithm

Method Summary
 Collection<AbstractCatchElement> getCatchElements()
          Get all nested <catch> elements.
 String getExpr()
          Selector for the expr attribute.
 Object getFormItemVariable()
          Retrieves the form item variable.
 String getName()
          Retrieves the name of this FormItem..
 VoiceXmlNode getNode()
          Retrieves the encapsualed VoiceXmlNode.
 boolean isSelectable()
          Guard conditions, which governs whether or not this form item can be selected by the form interpretation algorithm.
 void setFormItemVariable(Object value)
          Sets the form item variable.
 
Methods inherited from interface org.jvoicexml.interpreter.FormItemVisitable
accept
 

Method Detail

getFormItemVariable

Object getFormItemVariable()
Retrieves the form item variable.

Each form has an associated form item variable. which by default is set to ECMA_SCRIPT_UNDEFINED when the form is entered. This form item variable will contain the result of interpreting the form item. An input item's form variable can be given a name using the name attribute or left nameless in which case an internal name is generated.

Returns:
Result of interpreting this form item.
See Also:
Context.getUndefinedValue()

setFormItemVariable

void setFormItemVariable(Object value)
Sets the form item variable.

Parameters:
value - New value for the form item variable.

getName

String getName()
Retrieves the name of this FormItem..

Returns:
Name of a dialog scoped form item variable.

isSelectable

boolean isSelectable()
Guard conditions, which governs whether or not this form item can be selected by the form interpretation algorithm.

This default guard condition just tests to see if the form item variable has a value. If it does, this form item will not be visited.

Returns:
true if the form item's variable has no value.
See Also:
getFormItemVariable(), Context.getUndefinedValue()

getNode

VoiceXmlNode getNode()
Retrieves the encapsualed VoiceXmlNode.

Returns:
Related VoiceXmlNode.

getExpr

String getExpr()
Selector for the expr attribute.

Returns:
Value of the expr attribute.
Stuff to complete
replace this with a superclass or an own interface.

getCatchElements

Collection<AbstractCatchElement> getCatchElements()
Get all nested <catch> elements.

Returns:
Collection of all nested <catch> tags.


Copyright © 2005-2007 JVoiceXML group.