Modal Options
Modal windows can be launched from fluid components in four different ways. Each of these four scenarios allows you to specify modal options:
-
Programmatically, use one of the following PeopleCode built-in functions: DoModalComponentPopup, DoModalPopup, ViewContentURLModeless, or ViewModeless. Modal options are specified by the modal_options parameter.
-
For a group box defined as a grouplet, use the SetGroupletMOptions method to set modal options. (See Creating Grouplets with PeopleCode for more information on creating grouplets.)
-
On the Fluid Attributes page of a content reference definition, if you specify Modal for the Display In option, then the Modal Parameters field is displayed.
-
For a Tile Wizard definition, at Step 4, if you specify Modal for the Display In option, then the Modal Parameters field is displayed.
Important:
Always use a semicolon to terminate each modal option. For example:
&sPopupOptions = "bAutoClose@1;bPopup@1;";The following table lists modal options in alphabetical order. For Boolean options, specifying 1 enables the option; specifying 0 disables it:
| Option | Values | Default | Description |
|---|---|---|---|
|
bAutoClose |
0 | 1 |
0 |
Enable automatically closing the modal window when the user clicks anywhere outside the modal window. |
|
bAutoCloseWarn |
0 | 1 |
0 |
Enable display of a save warning if content in the modal window has been changed when bAutoClose has been enabled. Note: This option is applicable only when bAutoClose has been enabled by DoModalComponentPopup or DoModalPopup. |
|
bCenter |
0 | 1 |
1 |
Display the modal window near the center of the main window. |
|
bClose |
0 | 1 |
1 |
Enable the close icon in the header of the modal window. Note: This option is valid only for popup group boxes, only with the SetGroupletMOptions method, and only when the header is displayed; otherwise, it is ignored in all other contexts. Important: Do not disable both of auto-close and the close icon. |
|
bFullScreen |
0 | 1 |
0 |
Display the modal window so that it covers the entire screen. |
|
bHeader |
0 | 1 |
1 |
Display the header for the modal window. Note: This option is ignored by DoModalComponentPopup and DoModalPoup because the header content is displayed within the same iframe as the target content within the modal window. You must use styling on the page definition to hide the header with these PeopleCode functions. |
|
bMask |
0 | 1 |
1 |
Display a transparent mask over the parent window. Important: Disabling the mask is not recommended. Moreover, a mask is required when bAutoClose is enabled. |
|
bPopup |
0 | 1 |
0 |
Display the modal window adjacent to the trigger field with a chat dialog-style arrow pointing to the trigger field. |
|
bPopupMenu |
0 | 1 |
0 |
Display a modal window containing a pop-up menu adjacent to the trigger field with a chat dialog-style arrow pointing to the trigger field. For example:
Note: When bPopupMenu is enabled (set to 1), the system will automatically set bHeader to 0 (disabled), bAutoClose to 1 (enabled), bMask to 1 (enabled), and sMaskStyle to ps_masktrans; these options cannot be overridden. In addition, bVertical will be set to 1 (which is recommended), but it can be overridden. |
|
bVertical |
0 | 1 |
0 |
Specify the orientation of the modal window’s tail, which points back to the trigger control: a vertical orientation (1) means that the tail can point up or down; horizontal (0) means that the tail can point left or right. Note: If bVertical is set in conjunction with bPopupMenu to override the default vertical orientation set by bPopupMenu, then bVertical must follow bPopupMenu in the invocation. For example:
|
|
bSkipFocus |
0 | 1 |
0 |
When you enable bSkipFocus, the focus is set on the close button in the header if modal is a modeless window or if modal has a close icon in the header. |
|
sTitle |
String |
"" |
Set the title in the header of the modal window. Note: This option is ignored by DoModalComponentPopup and DoModalPoup because the header content is displayed within the same iframe as the target content within the modal window. Note: To allow spaces in the title and to properly escape special characters, store the title as a message catalog entry. Then, use the EscapeHTML built-in function on the retrieved message. For example:
|
|
sWidth sHeight |
String |
none |
Set the height and width of the modal window as a string value. You can specify any CSS supported unit of measure such as em, in, cm, px, %, and so on. For example:
Note: The recommended approach for sizing a modal window is to apply styles at the page level. |
|
width height |
Number |
none |
Set the height and width of the modal window in pixels. For example:
Note: The recommended approach for sizing a modal window is to apply styles at the page level. |
Related Topics