QuestionDef class

A question: one form control bound to one instance node.

Port of org.javarosa.core.model.QuestionDef.

Inheritance
Implementers

Constructors

QuestionDef({int id = -1, ControlType controlType = ControlType.input})
Creates a question with controlType.

Properties

actionController → ActionController
Actions registered on this element, by event.
finalinherited
additionalAttributes → List<TreeElement>
Attributes of the control element not handled by the parser, kept verbatim (e.g. rows, odk:tag).
finalinherited
appearance ↔ String?
The appearance attribute.
getter/setter pairinherited
bind ↔ TreeReference?
The absolute reference this element is bound to (null for a trigger without ref).
getter/setter pairinherited
children → List<FormElement>
Child elements (empty for questions).
no setteroverride
choices → List<SelectChoice>?
The static choices (<item>s), or null when there are none.
no setter
controlType ↔ ControlType
The kind of control.
getter/setter pair
deepChildCount → int
Number of questions at or below this element.
no setteroverride
dynamicChoices ↔ ItemsetBinding?
Dynamic choices from an <itemset>, if any.
getter/setter pair
hashCode → int
The hash code for this object.
no setterinherited
helpInnerText ↔ String?
Hint inner text (including <output> placeholders and HTML).
getter/setter pair
helpText ↔ String?
Hint text (the hint's text content), when not localized.
getter/setter pair
helpTextId ↔ String?
The itext id of the hint.
getter/setter pair
id ↔ int
A form-wide unique id assigned by the parser.
getter/setter pairinherited
isComplex → bool
Whether this question copies subtrees from its itemset (deprecated <copy> mode).
no setter
labelInnerText ↔ String?
Literal label text (when not localized).
getter/setter pairinherited
numChoices → int
Number of static choices.
no setter
osmTags ↔ List<OsmTag>?
Tags of an OSM capture question.
getter/setter pair
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
shouldLimitValueToSelectChoices → bool
Whether answers not among the choices should be cleared.
no setter
textId ↔ String?
The itext id of the label. A ;form suffix is stripped, as in JavaRosa.
getter/setter pairinherited

Methods

addChild(FormElement child) → void
Adds child. Throws for questions.
override
additionalAttribute(String? namespace, String name) → String?
The value of additional attribute name in namespace, if present.
inherited
addListener(FormElementListener listener) → void
Registers listener (once).
inherited
addSelectChoice(SelectChoice choice) → void
Adds a static choice, assigning its index.
attachChoice(Selection selection) → Selection
Returns selection bound to its static choice (by index, else by value).
childAt(int i) → FormElement?
The child at i, or null if out of range.
inherited
choiceAt(int i) → SelectChoice
The static choice at i.
choiceForValue(String value) → SelectChoice?
The static choice whose value is value, if any.
localeChanged(String locale, Localizer localizer) → void
Called when the current locale of localizer becomes locale.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
notifyListeners(int changes) → void
Notifies listeners of changes.
inherited
removeListener(FormElementListener listener) → void
Unregisters listener.
inherited
removeSelectChoice(SelectChoice choice) → void
Removes a static choice.
setAdditionalAttribute(String? namespace, String name, String? value) → void
Sets, adds or removes (with a null value) an additional attribute.
inherited
toString() → String
A string representation of this object.
inherited

Operators

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