Implementing Transfers and Modal Windows with PeopleCode

Eighteen PeopleCode functions are available to use for implementing transfers and creating modal windows. Some functions are available for use in fluid applications only, in classic applications only, or in other specific contexts. The information on these functions is presented in a table that has been split into four parts. See the legend that follows the table for an explanation of terms and abbreviations.

Source Location

Action

Target

Rel

Function

Description

FS

CS

AG/MD

IG

MW

F2F

F2C

C2C

C2F

CW

NW

2W

Avail

DoModal

Use the DoModal function to display a secondary page in a modal, secondary window with a child relationship to the parent window.

Y

Y

*

*

*

Y

N

Y

N

N

N

Y

pre-8.54

DoModalComponent

Use the DoModalComponent function to display a secondary component in a modal, secondary window with a child relationship to the parent window.

Y

Y

*

*

*

Y

N

Y

N

N

N

Y

pre-8.54

DoModalComponentPopup

Use DoModalComponentPopup as the recommended function to display a secondary fluid component in a modal, secondary window with a child relationship to the parent window. This function includes a modal_options parameter, which allows you to specify characteristics of the modal window such as height and width.

Y

N

*

*

*

Y

N

N

N

N

N

Y

8.54.00

DoModalPopup

Use DoModalPopup as the recommended function to display a secondary fluid page in a modal, secondary window with a child relationship to the parent window. This function includes a modal_options parameter, which allows you to specify characteristics of the modal window such as height and width.

Y

N

*

*

*

Y

N

N

N

N

N

Y

8.54.00

Source Location

Action

Target

Rel

Function

Description

FS

CS

AG/MD

IG

MW

F2F

F2C

C2C

C2F

CW

NW

2W

Avail

DoModalX

Use the DoModalX function to display a secondary page modally when you do not want it to display in a modal, secondary window.

N

Y

*

N

N

N

N

Y

N

Y

N

N

pre-8.54

DoModalXComponent

Use the DoModalXComponent function to display a secondary component modally when you do not want it to display in a modal, secondary window.

N

Y

*

N

N

N

N

Y

N

Y

N

N

pre-8.54

RedirectURL

Use the RedirectURL function in to navigate to the location specified by the URL parameter. 

N

Y

N

N

N

N

N

Y

Y

Y

N

N

pre-8.54

Transfer

Use the Transfer function to exit the current context and transfer the user to another page.

Y

Y

Y1

Y2

Y2

Y

Y

Y

Y

Y1

Y3

N

pre-8.54

TransferExact

Use the TransferExact function to exit the current context and transfer the end user to another page using an exact match of all keys in the optional key list.

Y

Y

Y1

Y2

Y2

Y

Y

Y

Y

Y1

Y3

N

pre-8.54

TransferModeless

Use the TransferModeless function to open a new page in a modeless window on top of the parent window.

N

Y

*

*

N

N

N

Y

N

N

N

Y

pre-8.54

TransferTop

Use the TransferTop function to exit the current context and transfer the user to another page by always replacing the current window.

Y

Y

Y

Y

Y

Y

Y

Y

Y

Y

N

N

8.55.13

Source Location

Action

Target

Rel

Function

Description

FS

CS

AG/MD

IG

MW

F2F

F2C

C2C

C2F

CW

NW

2W

Avail

ViewContentURL

Use the ViewContentURL function to open a new browser window and navigate to the location specified by the URL parameter.

N

Y

N

N

N

N

N

Y

N

N

Y

N

pre-8.54

ViewContentURLClassic

Use the ViewContentURLClassic function to navigate to the classic content specified by the URL parameter. 

Y

Y

Y1

Y

Y

N

Y

Y

N

Y

N

N

8.55.14

ViewContentURLFluid

Use the ViewContentURLFluid function to navigate to the fluid content specified by the URL parameter. 

Y

Y

Y1

Y

Y

Y

N

N

Y

Y

N

N

8.55.14

ViewContentURLModeless

Use the ViewContentURLModeless function to open a modeless modal window displaying the PeopleSoft component content (either classic or fluid) specified by the URL parameter.

Y

N

Y

Y

N

Y

Y

N

N

N

N

Y

8.55.11

ViewURL

Use the ViewURL function to navigate to the location specified by the URL parameter.

Y

Y

N

N

N

Y

Y

Y

Y

Y

Y3

N

pre-8.54

ViewURLModeless

Use the ViewURLModeless function to open a modeless modal window displaying the non-component content (for example, an iScript or external content) specified by the URL parameter.

Y

N

Y

Y

N

N

N

N

N

N

N

Y

8.55.11

Source Location

Action

Target

Rel

Function

Description

FS

CS

AG/MD

IG

MW

F2F

F2C

C2C

C2F

CW

NW

2W

Avail

ViewURLTop

Use the ViewURLTop function to exit the current context and navigate to the location specified by the URL parameter by always replacing the current window.

Y

Y

Y

Y

Y

Y

Y

Y

Y

Y

N

N

8.55.13

Legend

FS

Fluid standalone

CS

Classic standalone

AG/MD

Activity guide (incl. fluid navigation collections) or master/detail

IG

Interactive grouplet

MW

Modeless window

F2F

Fluid-to-fluid

F2C

Fluid-to-classic

C2C

Classic-to-classic

C2F

Classic-to-fluid

CW

Current window

NW

New window

2W

Secondary window (modal or modeless)

*

Refer to the values for the source type as a standalone component

1

When AJAX transfers are not enabled (default), the action exits the fluid wrapper and the content replaces the current window. When AJAX transfers are enabled, the new content is displayed in the target content area of the fluid wrapper.

2

When the target setting is current window, the content replaces the current content.

3

On iOS only, when the Safari browser is in full screen mode and when content has been set to open in a new window, the content replaces the current window instead. 

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.

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:

&sMenuTitle = EscapeHTML(MsgGetText(11124, 525, "Message Not Found: My Title"));
&sOptions = "sTitle@" | &sMenuTitle | ";");

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:

sWidth@50em;sHeight@100em;

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:

width@400;height@400;

Note: The recommended approach for sizing a modal window is to apply styles at the page level.