Difference between revisions of "Extensions.HMI.InputDialog"

From emotive
Jump to navigation Jump to search
m (Hb moved page InputDialog to Extensions.HMI.InputDialog: #3153)
 
(5 intermediate revisions by one other user 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 ==
 
== 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, StringVariable, StringTerm);
+
HMI.InputDialog(StringTerm message, StringTerm title, StringTerm initialValue, StringTerm instruction, StringTerm restriction, StringVariable result);
 
</syntaxhighlight>
 
</syntaxhighlight>
  
 
== Description ==
 
== Description ==
The '''InputDialog''' activity opens a dialog box that requests the user's input. If necessary, an initial value can be passed to the dialog that appears first in the input field. Also, an input constraint can be passed to the 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 only simple strings.}}
+
{{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] | To initialize the string value using the input field.}}
+
{{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 displayed on the Input dialog to show information about the expected value.}}
+
{{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 limitation on the amount of allowable input values. The restriction will be formulated by a regular expression, to be used by runtime systems, the input data to pre-validate.}}
+
{{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] | The entered value is assigned to this string variable.}}
+
{{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.}}
 
|}
 
|}
  
 
== OTL Examples ==
 
== OTL Examples ==
 
<syntaxhighlight lang="java" enclose="div" style="font-size: medium;">
 
<syntaxhighlight lang="java" enclose="div" style="font-size: medium;">
String result;
+
/// Local Declarations
  
Hmi.InputDialog("Message", "Title", "Init", "Instruction", result, "Restriction");
+
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.

Icons Note.png 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);

See also

ConfirmDialog
ChoiceDialog
ShowDocumentDialog