DoModalPopup

Mon 01 January 2018

Syntax

DoModalPopup(modal_options, Cancel_button_ID, display_only, cached, Page.PAGE_NAME, title, xpos, ypos[, level, scrollpath, target_row])

In which scrollpath is:

[Record.level1_recname, level1_row, [Record.level2_recname, level2_row, ]] Record.target_recname

To prevent ambiguous references, you can also use Scroll. scrollname , in which scrollname is the same as the scroll level’s primary record name.

Description

Use the DoModalPopup function in fluid applications only. Use DoModalPopup to display a secondary fluid page as popup modal next to a parent control. This means that the user must dismiss the secondary window before continuing work in the page from which the secondary page was called. In addition, DoModalPopup can display the secondary page in a display-only mode.

Note: Alternatively, you can specify a secondary page in a command push button definition without using PeopleCode. This may be preferable for performance reasons, especially with PeopleSoft Pure Internet Architecture.

DoModalPopup can display a single page modally. To display an entire component modally, use DoModalComponentPopup. Any variable declared as a component variable will still be defined after calling the DoModalPopup function. If you call DoModalPopup without specifying a level number or any record parameters, the function uses the current context as the parent. See .

Parameters

Field or Control

Definition

modal_options

Specifies custom modal options as a String value. See for more information.

Cancel_button_ID

Specifies the ID of the cancel button as a string value.

display_only

Specifies a Boolean value indicating whether the modal secondary page is display-only.

cached

Specifies a Boolean value indicating whether to cache the <div> group container for the modal secondary page within the parent page.

Note: The value of display_only must be True for this parameter to take effect.

Page. PAGE_NAME

The name of the secondary page.

title

The text that displays in the caption of the secondary page.

xpos
The pixel coordinates of the top left corner of the secondary page, offset from the top left corner of the parent page (the default of -1, -1 means centered).
ypos

The pixel coordinates of the top right corner of the secondary page, offset from the top right corner of the parent page (the default of -1, -1 means centered).

level

Specifies the level of the scroll level on the parent page that contains the row corresponding to level 0 on the secondary page.

scrollpath

A construction that specifies a scroll level in the component buffer.

target_row

The row number of the row in the parent page corresponding to the level 0 row in the secondary page.

Returns

Returns a number that indicates how the secondary page was terminated. A secondary page can be terminated by the user clicking a built-in OK or Cancel button, or by a call to the EndModal function in a PeopleCode program. In either case, the return value of DoModal is one of the following:

  • 1 if the user clicked OK in the secondary page, or if 1 was passed in the EndModal function call that terminated the secondary page.

  • 0 if the user clicked Cancel in the secondary page, or if 0 was passed in the EndModal function call that terminated the secondary page.