Difference between revisions of "Extensions.HMI.InputDialog"
Jump to navigation
Jump to search
Line 1: | Line 1: | ||
{{DISPLAYTITLE: '''InputDialog'''}}[[Category:HMI]] | {{DISPLAYTITLE: '''InputDialog'''}}[[Category:HMI]] | ||
== Classification == | == Classification == | ||
− | {{ClassificationActivity | InputDialog | Dialog, the user's input requesting | [[Action]]| [[Extensions.HMI|OTX HMI extension]] | [[Dialog related actions]] | [[Core. | + | {{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 == | == OTL Syntax == | ||
<syntaxhighlight lang="java" enclose="div" style="font-size: medium;"> | <syntaxhighlight lang="java" enclose="div" style="font-size: medium;"> | ||
− | + | HMI.InputDialog(StringTerm, StringTerm, StringTerm, StringTerm, StringTerm, StringVariable); | |
</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 shall be shown initially in the input field. Also an input restriction can be passed to the dialog; this shall 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 | [[Core.DataTypes.SimpleDataType.String|String]] | [[Term]] | - | [0..1] | | + | {{TableRowPropertie1| InitialValue | [[Core.DataTypes.SimpleDataType.String|String]] | [[Term]] | - | [0..1] | The string value that shall be used to initialize the dialog's input field.}} |
− | {{TableRowPropertie2| Instruction | [[Core.DataTypes.SimpleDataType.String|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 should be introduced.}} |
− | {{TableRowPropertie1| Restriction | [[Core.DataTypes.SimpleDataType.String|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 shall be formulated by a regular expression which shall be used by runtime systems to pre-validate the input data.}} |
− | {{TableRowPropertie2| Result | [[Core.DataTypes.SimpleDataType.String|String]] | [[Variable]] | - | [1] | | + | {{TableRowPropertie2| Result | [[Core.DataTypes.SimpleDataType.String|String]] | [[Variable]] | - | [1] | After the user dismisses the input dialog, the entered value shall be assigned to the string variable given by this element.}} |
|} | |} | ||
== OTL Examples == | == OTL Examples == | ||
<syntaxhighlight lang="java" enclose="div" style="font-size: medium;"> | <syntaxhighlight lang="java" enclose="div" style="font-size: medium;"> | ||
− | String | + | String String1; |
− | + | /// Flow | |
+ | |||
+ | HMI.InputDialog("Message", "Title", "Init", "Instruction", "Restriction", String1); | ||
</syntaxhighlight> | </syntaxhighlight> | ||
Revision as of 04:40, 28 September 2018
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, StringTerm, StringTerm, StringTerm, StringTerm, StringVariable);
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 shall be shown initially in the input field. Also an input restriction can be passed to the dialog; this shall 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 shall 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 should be introduced. |
Restriction | String | Term | - | [0..1] | A restriction onto the set of allowed input values. The restriction shall be formulated by a regular expression which shall 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 shall be assigned to the string variable given by this element. |
OTL Examples
String String1;
/// Flow
HMI.InputDialog("Message", "Title", "Init", "Instruction", "Restriction", String1);