Control Initialization

When runtime loads the control, items with a blank key are valid, but display no description if the description parameter is also blank. If the item has a key which is a string of one or more continuous blank characters, runtime concatenates the multiple blank characters to a single blank character. Similarly, the engine removes blank characters that follow an otherwise non-blank item key value before inserting it into the control.

Note: The previous behavior of the HTML runtime engine automatically loading a combo box item having:key = "" (an empty string) or " " (blank) (depending on SP level)anditem description = (None)when the control is marked in FDA as being not required is discontinued as of JD Edwards EnterpriseOne 8.94.

Additionally, to be functional, a combo box must have a valid DD item associated with it. Combo boxes that do not have such an associated item are rendered displaying the text string, "Uninitialized," and are automatically disabled.

If you set a combo box as a string data type (such as string or character), when runtime initializes the control and loads the -- Select One -- prompt into the combo box, the prompt's internal key value is "" (an empty string). If you set a combo box as a numeric data type (such as Integer, ID, or Math Numeric), when runtime initializes the control and loads the -- Select One -- prompt into the combo box, the prompt's internal key value is -999999999. It is therefore important, when you are building your application ERs, to allow for the case when the user leaves the control set selected on the default prompt item and the key value is sent from the control.

The control initialization process is illustrated in this flowchart:

Combo box control initialization process.

Generally two cases exist where runtime might show an item description other than the -- Select One -- prompt as the currently selected item in a combo box when a form appears initially:

  • When a given combo box's associated DD item has a default value defined and you come into the form in Add mode, runtime attempts to match the default value to the keys of the items currently loaded in the combo box and sets that item as the selected item.

  • Dependent on form type, regardless of whether the form was started using form interconnect, the current form mode (Add/Copy/Update), and whether the control is mapped to a business view column (Key or otherwise), runtime might have retrieved a key value also and will try to set this as the current selected item in the combo box.

If you want to load the combo box from cache or using the Add Item system function, the event most typically used for such loads is Post Dialog Initialized.