FormContainer¶
-
public class
FormContainer
¶ A Form Container contains the list of
DatatypeWidget
widgets included in a Form along with the visual layout containing them.
Fields¶
widgets¶
-
List<DatatypeWidget<EhrDatatype>>
widgets
¶ The widgets.
Constructors¶
FormContainer¶
-
public
FormContainer
(ViewGroup layout, List<DatatypeWidget<EhrDatatype>> widgets, int index)¶ Creates a new Form Container
Parameters: - layout – the layout the layout containing all the
DatatypeWidget
- widgets – the list of the
DatatypeWidget
- index – the index of this form
- layout – the layout the layout containing all the
Methods¶
getWidgets¶
-
public List<DatatypeWidget<EhrDatatype>>
getWidgets
()¶ Get the widgets of this form container.
Returns: the widgets
resetAllWidgets¶
-
public void
resetAllWidgets
()¶ Reset the content of all widgets of this form according to the current value of their underlying data types.
resetWidget¶
-
public void
resetWidget
(int index)¶ Reset the content of the selected widget according to the current value of the underlying data type.
Parameters: - index – the index
submitAllWidgets¶
-
public void
submitAllWidgets
()¶ Submit all widgets.
Throws: - InvalidDatatypeException – if any of the widgets contains invalid data
submitWidget¶
-
public void
submitWidget
(int index)¶ Update the value of the underlying data type according to the current content of the widget.
Parameters: - index – the widget index
Throws: - InvalidDatatypeException – if the content cannot be converted to the datatype.