Check List¶
The CheckList widget in Emakin allows multiple selections from a list of checkboxes. List options can be sourced from various data sources, including static lists or query results.
Single Mode¶
CheckList supports storing selections in a single data model element by enabling Single Mode. In this mode, checked item values are stored as a comma-separated string.
- Enabling Single Mode:
Set theItemXPath
property to the!
character.
Remarks¶
Default Behavior¶
- The CheckList widget uses a sequence-type data model to store selected items.
- Checked Items: Each selected item creates a new element in the data model with the corresponding value.
Data Mapping¶
-
Value Assignment:
- Defined by the data source item's
Value
property using theValueXPath
property. - Default: Empty string, assigning the data source item value to the new element.
- Defined by the data source item's
-
Label Assignment:
- Defined by the data source item's
Text
property using theCaptionXPath
property. - Default: Empty string, assigning the data source item's
Text
property to the new element'sCaption
attribute.
- Defined by the data source item's
State Attribute¶
The CheckList widget supports monitoring list item changes using the State attribute:
Temp
: Marks newly checked items.- Existing Items: Preserved as is.
Deleted
: Marks items that were unchecked.
Clearing the State Attribute:
Use the scripting method $Xml.CommitDeletes() to reset the State
attribute.
Example¶
An example checklist widget that uses data sources can be defined as follows:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
|
Single Mode Example¶
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
|