public interface FormItem extends FormItemVisitable, DialogConstruct
FormInterpretationAlgorithm| Modifier and Type | Method and Description |
|---|---|
boolean |
evaluateCondition()
An expression to evaluate in conjunction with the test of the form item
variable.
|
java.lang.Object |
evaluateExpression(DataModel model)
Retrieves the evaluated
expr attribute. |
java.lang.Object |
getFormItemVariable()
Retrieves the form item variable.
|
java.lang.String |
getName()
Retrieves the name of this
FormItem.. |
org.jvoicexml.xml.VoiceXmlNode |
getNode()
Retrieves the encapsulated
VoiceXmlNode. |
java.lang.String |
getNodeTagName()
Retrieves the tag name of the encapsulated node.
|
void |
init(DataModel model)
Initializes this form item.
|
boolean |
isModal()
Checks if this form item is modal.
|
boolean |
isSelectable()
Guard conditions, which governs whether or not this form item can be
selected by the form interpretation algorithm.
|
int |
setFormItemVariable(java.lang.Object value)
Sets the value of the form item variable.
|
acceptvoid init(DataModel model) throws SemanticError, BadFetchError
model - the employed data modelSemanticError - error initializing this form itemBadFetchError - error initializing this form itemjava.lang.Object getFormItemVariable()
Each form has an associated form item variable. which by default is set
to null 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.
int setFormItemVariable(java.lang.Object value)
throws SemanticError
value - new value for the form item variable.0 if setting the form item variable was successfulSemanticError - error setting the valuejava.lang.String getName()
FormItem..boolean isSelectable()
throws SemanticError
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.
true if the form item's variable has no value.SemanticError - error evaluating the cond condition.getFormItemVariable()org.jvoicexml.xml.VoiceXmlNode getNode()
VoiceXmlNode.VoiceXmlNode.java.lang.String getNodeTagName()
java.lang.Object evaluateExpression(DataModel model) throws SemanticError
expr attribute.model - the data model to use for evaluationexpr attribute.SemanticError - error evaluating the expr attribute.boolean evaluateCondition()
throws SemanticError
true, or in the case
of <initial>, a test to see if any input item variable
has been filled in.true if the cond attribute of the form
item evaluates to true.SemanticError - error evaluating the cond attribute.boolean isModal()
true if the form item is modal.