Class Index
static org.cote.js.xhtml.XHTMLFormComponent
version 1.9.18
Instance of XHTMLComponentImpl.
This class participates in the engine library.
org.cote.js.xhtml.XHTMLFormElement
version 1.9.18
This class participates in the engine library.
Index
Method Index
- public getElement: Returns the rendered HTML Form Element.
- public getIsRendered: Returns true if the form elemnet is rendered.
- public getName: Returns the name of form element.
- public getObjectId: Returns the id of the underlying XHTMLComponent
- public getReferenceId: Returns the id of the reference implementor, such as an Engine object.
- public getType: Returns the type of form element.
- public getValue: Returns the value of form element.
Methods
getElement
Returns the rendered HTML Form Element.
Syntax
o = getElement(
)
Returns
o as object: HTML Form Element
getIsRendered
Returns true if the form elemnet is rendered.
Syntax
b = getIsRendered(
)
Returns
b as boolean: Bit indicating whether the element is rendered.
getName
Returns the name of form element.
Syntax
t = getName(
)
Returns
t as String: The name of form element.
getObjectId
Returns the id of the underlying XHTMLComponent
Syntax
i = getObjectId(
)
Returns
i as String: The id of the XHTMLComponent.
getReferenceId
Returns the id of the reference implementor, such as an Engine object.
Syntax
i = getReferenceId(
)
Returns
i as String: The id of the reference implementor.
getType
Returns the type of form element.
Syntax
t = getType(
)
Returns
t as String: The type of form element.
getValue
Returns the value of form element.
Syntax
t = getValue(
)
Returns
t as String: The value of form element.
org.cote.js.xhtml.XHTMLForm
version 1.9.18
This class participates in the engine library.
Index
Method Index
- public getElement: Returns the specified XHTMLFormElement object.
- public getElementByName: Returns the specified XHTMLFormElement object.
- public getElements: Returns an array of XHTMLFormElement objects.
- public isElement: Returns true if the specified name exists.
Methods
getElement
Returns the specified XHTMLFormElement object.
Syntax
e = getElement(
i
)
Parameters
- i as int : Index of the XHTMLFormElement object..
Returns
e as XHTMLFormElement: XHTMLFormElement object.
getElementByName
Returns the specified XHTMLFormElement object.
Syntax
e = getElementByName(
n
)
Parameters
- n as String : Name of the element.
Returns
e as XHTMLFormElement: XHTMLFormElement object.
getElements
Returns an array of XHTMLFormElement objects.
Syntax
a = getElements(
)
Returns
a as array: Array of XHTMLFormElement objects.
isElement
Returns true if the specified name exists.
Syntax
b = isElement(
i
)
Parameters
- i as variant : Name or index of the XHTMLFormElement object.
Returns
b as boolean: Bit indicating whether the specified object name exists.
org.cote.js.xhtml.XHTMLFormComponentImpl
version 1.9.18
Manage collection of form elements used within Engine and XHTMLComponent contexts.
This class participates in the engine library.
Index
Property Index
- public object_config (internal): Object API structure for storing sub structures: object_config.pointers and object_config.status.
- public object_id (internal): Unique instance identifier.
- public object_type (internal): The type of this object.
- public object_version (internal): Version of the object class.
- public ready_state (internal): Object load and execution state. Follows: 0 unitialized, 1 through 3 variant, 4 ready, 5 destroyed.
Method Index
- public addComponent: Adds an XHTMLComponent, creating a new XHTMLFormElement that can synchronize and retain data whether or not the HTML Form Element continues to exist.
- public clearForm: Clears or resets the specified form elements.
- public getElement: Returns the HTML Node corresponding to the specified name and form index.
- public getElements: Returns an array of visible or active form elements.
- public getForm: Returns the specified XHTMLForm object.
- public getFormByName: Returns the specified XHTMLForm object.
- public getForms: Returns an array of XHTMLForm objects.
- public getObjectId: Returns the unique id of the object.
- public getObjectType: Returns the type of the object.
- public getObjectVersion: Returns the version of the object.
- public getPointers: Returns the object_config.pointers sub structure.
- public getReadyState: Returns the state of the object.
- public getStatus: Returns the object_config.status sub structure.
- public getValue: Returns the value of the XHTMLFormElement. Checkbox values are bit, and multi-selects are arrays of selected values.
- public getValue: Sets the value of the specified XHTMLFormElement.
- public getXElement: Returns the XHTMLFormElement object corresponding to the specified name and form index.
- public isForm: Returns true if the specified name exists.
- public removeForm: Removes the XHTMLForm object.
- public resetAll: Clears all forms and form hashmaps data and pointers.
- public resetForm: Resets the specified form elements to either their default state or their previous state.
- public synchronizeComponent (internal): Synchronizes the XHTMLFormElement, XHTMLComponent, and the rendered HTML Field.
- public validate: Validates the specified form field based on the specified validation pattern id. Uses the org.cote.js.xhtml.validator.XHTMLValidator class.
- public validateForm: Validates form fields based on the configured validation patterns. Uses the org.cote.js.xhtml.validator.XHTMLValidator class.
Properties
object_config
Object API structure for storing sub structures: object_config.pointers and object_config.status.
Syntax
object = object.object_config
object_id
Unique instance identifier.
Syntax
String = object.object_id
object_type
The type of this object.
Syntax
String = object.object_type
object_version
Version of the object class.
Syntax
String = object.object_version
ready_state
Object load and execution state. Follows: 0 unitialized, 1 through 3 variant, 4 ready, 5 destroyed.
Syntax
int = object.ready_state
Methods
addComponent
Adds an XHTMLComponent, creating a new XHTMLFormElement that can synchronize and retain data whether or not the HTML Form Element continues to exist.
Syntax
void addComponent(
x, ri
)
Parameters
- x as XHTMLComponent : XHTMLComponent object representing an HTML Form Element.
- ri as String (optional): Reference id for field containment.
clearForm
Clears or resets the specified form elements.
Syntax
b = clearForm(
i, b, q
)
Parameters
- i as int (optional): Index identifying a form.
- b as boolean (optional): Bit indicating whether the form should be reset.
- q as boolean (optional): Bit indicating whether the form should be reset to the default value instead of the previous value.
Returns
b as boolean: Returns true if the form was reset, false otherwise.
getElement
Returns the HTML Node corresponding to the specified name and form index.
Syntax
o = getElement(
n, i
)
Parameters
- n as String : String identifying the name of the XHTMLFormElement object.
- i as int (optional): Index identifying a XHTMLForm.
Returns
o as DOMNode: HTML Form Field Node.
getElements
Returns an array of visible or active form elements.
Syntax
a = getElements(
i
)
Parameters
- i as int (optional): Index identifying a form.
Returns
a as array: Array of visible or active form elements.
getForm
Returns the specified XHTMLForm object.
Syntax
e = getForm(
i
)
Parameters
- i as int : Index of the XHTMLForm object..
Returns
e as XHTMLForm: XHTMLForm object.
getFormByName
Returns the specified XHTMLForm object.
Syntax
e = getFormByName(
n
)
Parameters
- n as String : Name of the element.
Returns
e as XHTMLForm: XHTMLForm object.
getForms
Returns an array of XHTMLForm objects.
Syntax
a = getForms(
)
Returns
a as array: Array of XHTMLForm objects.
getObjectId
Returns the unique id of the object.
Syntax
i = getObjectId(
)
Returns
i as String: The unique object instance id.
getObjectType
Returns the type of the object.
Syntax
t = getObjectType(
)
Returns
t as String: The type of the object instance.
getObjectVersion
Returns the version of the object.
Syntax
v = getObjectVersion(
)
Returns
v as String: The version of the object instance.
getPointers
Returns the object_config.pointers sub structure.
Syntax
o = getPointers(
)
Returns
o as object: The object_config.pointers substructure.
getReadyState
Returns the state of the object.
Syntax
s = getReadyState(
)
Returns
s as int: The object ready state.
getStatus
Returns the object_config.status sub structure.
Syntax
o = getStatus(
)
Returns
o as object: The object_config.status substructure.
getValue
Returns the value of the XHTMLFormElement. Checkbox values are bit, and multi-selects are arrays of selected values.
Syntax
v = getValue(
n, i
)
Parameters
- n as String : String identifying the name of the XHTMLFormElement object.
- i as int (optional): Index identifying a XHTMLForm.
Returns
v as variant: The value of the XHTMLFormElement.
getValue
Sets the value of the specified XHTMLFormElement.
Syntax
b = getValue(
n, v, i
)
Parameters
- n as String : String identifying the name of the XHTMLFormElement object.
- v as variant : Value of the XHTMLFormElement
- i as int (optional): Index identifying a XHTMLForm.
Returns
b as boolean: Bit indicating whether the value was set.
getXElement
Returns the XHTMLFormElement object corresponding to the specified name and form index.
Syntax
o = getXElement(
n, i
)
Parameters
- n as String : String identifying the name of the XHTMLFormElement object.
- i as int (optional): Index identifying a XHTMLForm.
Returns
o as XHTMLFormElement: XHTMLFormElement object.
isForm
Returns true if the specified name exists.
Syntax
b = isForm(
i
)
Parameters
- i as variant : Name or index of the XHTMLForm object..
Returns
b as boolean: Bit indicating whether the specified object name exists.
removeForm
Removes the XHTMLForm object.
Syntax
b = removeForm(
v
)
Parameters
- v as variant : Name, index, or object representing the XHTMLForm object.
Returns
b as boolean: Bit whether the form was removed.
resetAll
Clears all forms and form hashmaps data and pointers.
Syntax
void resetAll(
)
resetForm
Resets the specified form elements to either their default state or their previous state.
Syntax
b = resetForm(
i, q
)
Parameters
- i as int (optional): Index identifying a form.
- q as boolean (optional): Bit indicating whether the form should be reset to the default value instead of the previous value.
Returns
b as boolean: Returns true if the form was reset, false otherwise.
synchronizeComponent
Synchronizes the XHTMLFormElement, XHTMLComponent, and the rendered HTML Field.
Syntax
o = synchronizeComponent(
x, b, l, q, s
)
Parameters
- x as XHTMLComponent : XHTMLComponent object representing an HTML Form Element.
- b as boolean (optional): Bit indicating whether this is a sync-in or sync-out operation.
- l as boolean (optional): Bit indicating whether the XHTLMFormElement should be linked to the rendered HTML Form Field.
- q as boolean (optional): Bit indicating whether the field should be reset to the default value before synchronizing.
- s as variant (optional): Default value to set on the field
Returns
o as boolean: Bit indicating whether the field was synchronized.
validate
Validates the specified form field based on the specified validation pattern id. Uses the org.cote.js.xhtml.validator.XHTMLValidator class.
Syntax
o = validate(
n, w, i
)
Parameters
- n as variant : Name or index of the XHTMLFormElement.
- w as String : Validation pattern id.
- i as variant (optional): Name or index of the XHTMLForm.
Returns
o as boolean: Bit indicating whether the form field validated.
validateForm
Validates form fields based on the configured validation patterns. Uses the org.cote.js.xhtml.validator.XHTMLValidator class.
Syntax
o = validateForm(
fi, b
)
Parameters
- fi as variant : Name or index of a form.
- b as boolean (optional): Bit indicating whether focus should be set on fields failing validation.
Returns
o as boolean: Bit indicating whether the form validated.