Formatting Object Model Reference > Content > Format Controls > fContextCondition interface
  
fContextCondition interface
The context condition to test, along with the possible set of actions to perform when the condition has been matched. This represents the "if", "elseif", and "else" keywords in the Context control stream, along with all other keywords that define the actions that apply to the condition.
ConditionTypes enumeration
The types of possible conditions.
The ConditionTypes enumeration has the following constants of type int.
TYPE_IF = 0
An "if" condition.
TYPE_ELSEIF = 2
An "elseif" condition.
TYPE_ELSE = 1
An "else" condition.
conditions attribute
An array of nested conditions to test when this condition is met.
conditions
Access
read-only
Returns
fContextCondition[]
onEnter attribute
A fStream or JavaScript function that will be formatted when entering the condition matched by this item.
onEnter
Access
read-write
Returns
Object
onExit attribute
A fStream or JavaScript function that will be formatted when leaving the condition matched by this item.
onExit
Access
read-write
Returns
Object
test attribute
The test to run if the condition is of type fContextCondition-TYPE_IF or fContextCondition-TYPE_ELSEIF. This property is ignored for type fContextCondition-TYPE_ELSE.
test
Access
read-write
Returns
String
type attribute
The type of condition. Possible values are in fContextCondition-ConditionTypes.
type
Access
read-write
Returns
int
addCondition method
Adds a new condition to the conditions array.
addConditioncondition
Parameters
fContextConditioncondition
The condition to add to the conditions array. If this value is null or undefined, a new fContextCondition object will be created.
Returns
fContextCondition. The new fContextCondition object.
clearConditions method
Removes all the specified conditions from the conditions array.
clearConditions
Parameters
None
Returns
void. None.
fContextCondition method
Creates a new fContextCondition object.
fContextCondition
Parameters
None
Returns
fContextCondition. The newly created object.
insertAfter method
Insert a new condition after this one in the parent's conditions array.
insertAftercondition
Parameters
fContextConditioncondition
The condition to add after this one in the parent's conditions array. If this value is null or undefined, a new fContextCondition object will be created.
Returns
fContextCondition. The new fContextCondition object.
insertBefore method
Insert a new condition before this one in the parent's conditions array.
insertBeforecondition
Parameters
fContextConditioncondition
The condition to add before this one in the parent's conditions array. If this value is null or undefined, a new fContextCondition object will be created.
Returns
fContextCondition. The new fContextCondition object.
readResolve method
Return the object corresponding to the given serialized representation.
readResolveobj
Parameters
Objectobj
The serialized representation.
Returns
fContextCondition. The object corresponding to the serialized representation.
remove method
Remove this condition from the parent's conditions array.
remove
Parameters
None
Returns
void. None
removeCondition method
Removes the specified condition from the conditions array.
removeConditioncondition
Parameters
fContextConditioncondition
The context condition to remove.
Returns
void. None.