Service help to GUI element map

Statements in service help have two components. These are commands and its options. After the conversion:

  1. Commands in the service help become child nodes of service in the Command pane.

  2. Options become GUI elements which will display in the Option pane when you select the command.

Example F.1. DEMO service help

Response
--------
DEMO Service Help

RESET  FORCE
RANDOM <REG | GEN>
LOG    GLOBAL | MACHINE
SWITCH [ENABLED | DISABLED]
REPEAT [ONCE]
READ   <Message>...
HELP

	

The following Table F.2, “DEMO service help conversion” shows the conversion of command and options specified in Example F.1, “DEMO service help”.

Table F.2. DEMO service help conversion
Statement Conversion
RESET FORCE
RANDOM <REG | GEN>
LOG GLOBAL | MACHINE
SWITCH [ENABLED | DISABLED]
REPEAT [ONCE]
READ <Message>...

The following Table F.3, “Options-GUI elements mapping” shows the corresponding GUI element for the options specified in Example F.1, “DEMO service help”.

Table F.3. Options-GUI elements mapping
Option GUI element Type
FORCE
A label converts into a field.
<REG | GEN>
This is converted into a drop-down list which contains REG and GEN. You must select one of the items. The first one is selected by default.
GLOBAL | MACHINES
This is converted into a drop-down list which contains GLOBAL and MACHINES. You must select one of the items. The first one is selected by default.
[ENABLED | DISABLED]
This is converted into a drop-down list which contains an empty string, ENABLED and DISABLED. Empty string is selected by default, The empty string does not contribute to anything in a request string.
[ONCE]
This is converted into a checkbox. To include this option in the request string, select this checkbox.
<Message>
This is converted into a textbox. You specify a value in this textbox.
...
This is converted into two buttons. Initially only the + button will be displayed. To specify recurring options, click the + button. The block of GUI elements will be displayed with a - button. To remove these options, click the - button.

Displaying elements dynamically

Child options are also options of a command that depends on the selection of the parent option. These options are not displayed until you select or choose the parent option. Therefore, the options are displayed only when necessary.

Figure F.2. Parent and child options in a service help


Figure F.3. Parent option not selected


Figure F.4. Parent option selected


Creating elements dynamically

You create recurring elements dynamically. For example, as in Figure F.5, “Recurring option in a service help”, you may need to specify more than one file as an attachment. For each file, an identical block of elements will be needed. Click the + button to create those block of elements. You can create as many block of elements as necessary. Click the - button to remove the last block of elements.

Figure F.5. Recurring option in a service help

[BINARYATTACHMENT <File>]...
      

Figure F.6. Recurring option after conversion


Figure F.7. After specifying the first value


Figure F.8. After creating the second block of elements


Figure F.9. After specifying the second value


Figure F.10. After removing the second block of elements


Layout of elements

When statements are converted into GUI elements STAF GUI tries to lay out the elements as WYSIWYG (what you see is what you get). As shown in Table F.4, “EVENT REGISTER options”, STAF GUI will lay out the resulting GUI elements as they appear in the service help.

Table F.4. EVENT REGISTER options
TYPE <Type> [SUBTYPE <Subtype>]...
[ACKNOWLEDGETIMEOUT <Timeout>] [MAXATTEMPTS <Number>]
[PRIORITY <Number>] [PRIORITYDELTA <Number>]
[BYNAME | BYHANDLE]

Repeating commands in service help

Multiple commands with the same name in service help will yield only one node with that name under the service node in Command pane. Their options are treated as if they were presented in service help with '|' in between. Consequently, they are converted into a drop-down list.

Figure F.11. Event has multiple LIST command


Extra space characters in service help

STAF GUI discards extra space characters in service help before it converts into GUI elements, leaving only one space character between GUI elements. However, if there is no space character in between any two options, the converted GUI elements will be laid out next to each other without any space between.