DoModalX

Mon 01 January 2018

Syntax

DoModalX(showInModal, cancelButtonName, PAGE.pagename, 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 DoModalX function to display a secondary page modally when you do not want it to display in a modal, secondary window. Instead, the page to be displayed completely replaces the primary window when the showInModal parameter is set to False. Similar to DoModal, the user must complete work on the secondary page before continuing work in the page from which the secondary page was called.

Important! When the showInModal parameter is set to False, using DoModalX will completely replace the primary window, even if DoModalX is called from a modal window. In addition, this will also close any open modal windows. Therefore, Oracle recommends that DoModalX with the showInModal parameter set to False not be used after calling DoModal or DoModalComponent, or after calling DoModalX or DoModalXComponent when the showInModal parameter is set to True.

DoModalX can display a single page modally. To display an entire component modally, use DoModalXComponent.

Any variable declared as a component variable will still be defined after calling the DoModalX function.

If you call DoModalX without specifying a level number or any record parameters, the function uses the current context as the parent.

See .

Parameters

Field or Control

Definition

showInModal

Specify a Boolean value to indicate whether to display the secondary page in a modal, secondary window:

  • True display the page in a secondary, modal window similar to the function of DoModal

  • False do not display the page in a secondary window; instead, completely replace the primary window.

cancelButtonName

Currently, this parameter is not used and should be specified as an empty string: “”.

pagename

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 DoModalX 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.