Combo Box Web component

Use the Combo Box Web component when you would like to present a user with a drop-down list of values to choose from. Only one value can be selected.

General tab (iwcl:WComboBox)

Name
Enter a unique identifier for the iSeries Web component. Do not use blanks or hyphens in a name. See Rules for iSeries Web component names and values.
See Text string substitution for iSeries Web component labels for information about externalizing text strings for text substitution purposes.
Initial state
Select Disabled or Hidden, or both.
Disabled
Indicates that the Web component is not available for use.
Hidden
Indicates that the Web component is not visible on the page.
Orientation
Select the value to indicate the direction of the text and the alignment of the Web component on the page. The possible values are Default, Left-to-right, or Right-to-left.
Default
Specifies that the text direction and the alignment of the Web component on the page are inherited from the containing element.

For example, if the Web component is inserted in a form, and the form's orientation is specified as Right-to-left, then the orientation for the Web component is also Right-to-left.

The default is Left-to-right.

Left-to-right
Specifies that the text direction is left-to-right, and that the Web component is left-aligned on the page. This value overrides the inherited value.
Right-to-left
Specifies that the text direction is right-to-left, and that the Web component is right-aligned on the page. This value overrides the inherited value.
Tool tip
Enter the description to be displayed when the mouse pointer is on the Web component.
See Text string substitution for iSeries Web component labels for information about externalizing text strings for text substitution purposes.
Access key
Specify a character to be associated with a shortcut key that a user selects to bring focus to the Web component.
Tab index
Enter a number for the tab order of the Web component that is created. For example, a value of 1 means that this Web component is the first object to receive focus in the tab sequence.
Label
Enter a caption for the Web component.
See Text string substitution for iSeries Web component labels for information about externalizing text strings for text substitution purposes.
Label position
Specify the position of the caption by selecting either Top or Left.
Top
Places the caption above the Web component.
Left
Places the caption to the left of the Web component when the orientation is specified as Left-to-right. If the orientation is Right-to-left, the caption is placed to the right of the Web component.

Data tab

The data returned from a host program for a Combo Box Web component can be in one of two formats. For example, assume the combo box is defined in the Attributes view at design time with three data items named Apple, Orange, and Banana, and with values of A, O, and B, respectively. Banana is set to True to specify that it is preselected in the combo box.
  • If the value returned from the host program is a single field with a value of O without a delimiter, the combo box displays the items originally defined, but the item identified by the value O (Orange in this example), becomes the preselected item.
  • If the value returned is an array with the elements Potato;P;False, Carrot;C;True, and Tomato;T;False (that is, in key-value-selection format with delimiters), then the data is treated as dynamic data and it overwrites the initial data items defined for the combo box. In this case, Carrot, which is set to True, is the preselected item in the combo box.
Delimiter
Select the character used to delimit the values of options in the Web component when dynamic data is used to fill the combo box. The default character is a semicolon.
Name
Enter a name to associate with the assigned value. The name is the actual choice in the combo box. When the user selects this name, the value associated with it is sent to the program.
See Text string substitution for iSeries Web component labels for information about externalizing text strings for text substitution purposes.
Value
Enter the value that is sent to the program when the user selects the associated name. Note that the length of the value cannot be specified. When you define the parameter in your procedure to map the value, ensure that it is defined long enough to contain the longest value. The value is trimmed to the parameter length. Also note that the value cannot contain the delimiter character defined in the Delimiter field.
Selected
The default is False, which indicates that the item in the combo box is not pre-selected. To change the value to True, which indicates that the item is pre-selected, click the Selected field for the item and select True from the list. Only one item can have a value of True.
Add
To add an option, click Add and enter a name and value in the respective fields. The values for the selected status are False and True. The default is False.
Remove
To delete an option from the list of options, select the option then click Remove.
Up
To move an option upwards in the list of options, select the option then click Up.
Down
To move an option downwards in the list of options, select the option then click Down.

Events tab

Events
Choose any of the events in the list and use the JavaScript language to code an action for that event in the Script field. For example, if you select OnBlur , you might code the script alert("not applicable");. For a brief description of the events that apply to this Web component, see Web component events.

Styles tab

The Styles tab contains inline style options for the iSeries Web component.
Inline Style
Select the Fonts, Font styles, Background Color, and Text layout buttons to open the respective style definition windows. Use each window to select the options that you want to apply to the iSeries Web component.