Difference between revisions of "Extensions.HMI.InputDialog"
Jump to navigation
Jump to search
(Created page with "Category:HMI == Classification == {{ClassificationActivity | InputDialog | Dialog, the user's input requesting | Action| OTX HMI extension | Dialog related a...") |
|||
(7 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
− | [[Category:HMI]] | + | {{DISPLAYTITLE: '''InputDialog'''}}[[Category:HMI]] |
== Classification == | == Classification == | ||
− | {{ClassificationActivity | InputDialog | Dialog, the user's input requesting | [[Action]]| [[HMI|OTX HMI extension]] | [[Dialog related actions]] | [[OutOfBoundsException]] | - }} | + | {{ClassificationActivity | InputDialog | Dialog, the user's input requesting | [[Action]]| [[Extensions.HMI|OTX HMI extension]] | [[Extensions.HMI#Actions|Dialog related actions]] | [[Core.DataTypes.ComplexDataType.OutOfBoundsException|OutOfBoundsException]] | - }} |
− | == | + | == OTL Syntax == |
<syntaxhighlight lang="java" enclose="div" style="font-size: medium;"> | <syntaxhighlight lang="java" enclose="div" style="font-size: medium;"> | ||
− | InputDialog( | + | HMI.InputDialog(StringTerm message, StringTerm title, StringTerm initialValue, StringTerm instruction, StringTerm restriction, StringVariable result); |
</syntaxhighlight> | </syntaxhighlight> | ||
== Description == | == Description == | ||
− | The '''InputDialog''' activity opens a dialog | + | The '''InputDialog''' activity opens a dialog requesting string input from the user. If needed, an initial value can be passed to the dialog which will be shown initially in the input field. Also an input restriction can be passed to the dialog; this will be used by runtime systems to pre-validate inputs before they are passed back to the test sequence. Finally the entered value is assigned to a string variable for later use in the test sequence. |
− | {{Note|'''InputDialog''' can handle | + | {{Note|'''InputDialog''' can only handle simple strings. There are no facilities provided for number parsing etc. It is assumed that the OTX sequence will perform these actions upon receiving the value.}} |
== Properties == | == Properties == | ||
{| {{TableHeader}} | {| {{TableHeader}} | ||
{{TableRowPropertiesHeader}} | {{TableRowPropertiesHeader}} | ||
− | {{TableRowPropertie1| InitialValue | [[String]] | [[Term]] | - | [0..1] | | + | {{TableRowPropertie1| InitialValue | [[Core.DataTypes.SimpleDataType.String|String]] | [[Term]] | - | [0..1] | The string value that will be used to initialize the dialog's input field.}} |
− | {{TableRowPropertie2| Instruction | [[String]] | [[Term]] | - | [0..1] | An additional message that can be | + | {{TableRowPropertie2| Instruction | [[Core.DataTypes.SimpleDataType.String|String]] | [[Term]] | - | [0..1] | An additional message that can be shown on the input dialog to provide information regarding the expected value that will be introduced.}} |
− | {{TableRowPropertie1| Restriction | [[String]] | [[Term]] | - | [0..1] | A | + | {{TableRowPropertie1| Restriction | [[Core.DataTypes.SimpleDataType.String|String]] | [[Term]] | - | [0..1] | A restriction onto the set of allowed input values. The restriction will be formulated by a regular expression which will be used by runtime systems to pre-validate the input data.}} |
− | {{TableRowPropertie2| Result | [[String]] | [[Variable]] | - | [1] | | + | {{TableRowPropertie2| Result | [[Core.DataTypes.SimpleDataType.String|String]] | [[Variable]] | - | [1] | After the user dismisses the input dialog, the entered value will be assigned to the string variable given by this element.}} |
|} | |} | ||
− | == Examples == | + | == OTL Examples == |
<syntaxhighlight lang="java" enclose="div" style="font-size: medium;"> | <syntaxhighlight lang="java" enclose="div" style="font-size: medium;"> | ||
− | InputDialog(" | + | /// Local Declarations |
+ | |||
+ | String String1; | ||
+ | |||
+ | /// Flow | ||
+ | |||
+ | HMI.InputDialog("Message", "Title", "Init", "Instruction", "Restriction", String1); | ||
</syntaxhighlight> | </syntaxhighlight> | ||
== See also == | == See also == | ||
− | [[ConfirmDialog]] <br/> | + | [[Extensions.HMI.ConfirmDialog|ConfirmDialog]] <br/> |
− | [[ChoiceDialog]] <br/> | + | [[Extensions.HMI.ChoiceDialog|ChoiceDialog]] <br/> |
− | [[ShowDocumentDialog]] | + | [[Extensions.HMI.ShowDocumentDialog|ShowDocumentDialog]] |
Latest revision as of 02:32, 13 September 2019
Classification
Name | InputDialog |
Short Description | Dialog, the user's input requesting |
Class | Action |
Extension | OTX HMI extension |
Group | Dialog related actions |
Exceptions | OutOfBoundsException |
Checker Rules | - |
Standard Compliant | Yes |
OTL Syntax
HMI.InputDialog(StringTerm message, StringTerm title, StringTerm initialValue, StringTerm instruction, StringTerm restriction, StringVariable result);
Description
The InputDialog activity opens a dialog requesting string input from the user. If needed, an initial value can be passed to the dialog which will be shown initially in the input field. Also an input restriction can be passed to the dialog; this will be used by runtime systems to pre-validate inputs before they are passed back to the test sequence. Finally the entered value is assigned to a string variable for later use in the test sequence.
![]()
InputDialog can only handle simple strings. There are no facilities provided for number parsing etc. It is assumed that the OTX sequence will perform these actions upon receiving the value.
Properties
Name | Data Type | Class | Default | Cardinality | Description |
InitialValue | String | Term | - | [0..1] | The string value that will be used to initialize the dialog's input field. |
Instruction | String | Term | - | [0..1] | An additional message that can be shown on the input dialog to provide information regarding the expected value that will be introduced. |
Restriction | String | Term | - | [0..1] | A restriction onto the set of allowed input values. The restriction will be formulated by a regular expression which will be used by runtime systems to pre-validate the input data. |
Result | String | Variable | - | [1] | After the user dismisses the input dialog, the entered value will be assigned to the string variable given by this element. |
OTL Examples
/// Local Declarations
String String1;
/// Flow
HMI.InputDialog("Message", "Title", "Init", "Instruction", "Restriction", String1);