FormElement class abstract

A node of the form's control tree: the form itself, a group, a repeat or a question.

Port of org.javarosa.core.model.IFormElement (and its shared state). Form elements are built by the XForm parser and then read by the engine.

Implemented types
Implementers

Constructors

FormElement({int id = -1})
Creates an element with id.

Properties

actionController → ActionController
Actions registered on this element, by event.
final
additionalAttributes → List<TreeElement>
Attributes of the control element not handled by the parser, kept verbatim (e.g. rows, odk:tag).
final
appearance ↔ String?
The appearance attribute.
getter/setter pair
bind ↔ TreeReference?
The absolute reference this element is bound to (null for a trigger without ref).
getter/setter pair
children → List<FormElement>
Child elements (empty for questions).
no setter
deepChildCount → int
Number of questions at or below this element.
no setter
hashCode → int
The hash code for this object.
no setterinherited
id ↔ int
A form-wide unique id assigned by the parser.
getter/setter pair
labelInnerText ↔ String?
Literal label text (when not localized).
getter/setter pair
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
textId ↔ String?
The itext id of the label. A ;form suffix is stripped, as in JavaRosa.
getter/setter pair

Methods

addChild(FormElement child) → void
Adds child. Throws for questions.
additionalAttribute(String? namespace, String name) → String?
The value of additional attribute name in namespace, if present.
addListener(FormElementListener listener) → void
Registers listener (once).
childAt(int i) → FormElement?
The child at i, or null if out of range.
localeChanged(String locale, Localizer localizer) → void
Called when the current locale of localizer becomes locale.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
notifyListeners(int changes) → void
Notifies listeners of changes.
removeListener(FormElementListener listener) → void
Unregisters listener.
setAdditionalAttribute(String? namespace, String name, String? value) → void
Sets, adds or removes (with a null value) an additional attribute.
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited