Using Secondary Pages

This section provides an overview of secondary pages and discusses how to:

  • Define secondary pages.

  • Insert secondary page controls.

  • Associate secondary pages with primary pages.

Secondary pages are pages that you access through another page, usually by clicking a link or push button. Secondary pages are ideal for entering and updating data that is supplemental to the data on the primary page or data that is common to and can be accessed from multiple primary pages. While a secondary page might sometimes appear as just another page to the user at runtime, secondary pages have certain characteristics that are not shared with standard pages. For example:

  • Secondary pages are not standalone pages that you access through the menu structure. You can only access a secondary page from its primary page; the primary page and the secondary page are associated by push button or link page controls.

  • Secondary pages include OK and Cancel or Return buttons (or equivalent alternatives) so that the user can accept or discard input, dismiss the secondary page, and return to the primary page.

  • Secondary pages display no component buttons, such as Save, Return to Search, and so on.

Modal secondary pages do not appear in a browser window. Modal secondary pages appear in front of a browser window, capturing focus and disabling the primary page until you dismiss the secondary page.

You can move modal secondary pages by dragging the page title bar. Moving the page is useful when you want to view information on the primary page while working with the secondary page. The appearance of the cursor changes to indicate that you can move the page.

Use these guidelines to determine whether to specify secondary pages as modal. Specify a secondary page as modal when:

  • The content of the secondary page is relevant to the context of the primary page.

    For example, you need to be able to see both the secondary page and primary page simultaneously.

  • The content of the secondary page is such that the user can complete the transaction quickly and easily.

By default, secondary pages appear as modal pages. You can change the default behavior at the definition level by deselecting the Disable Display in Modal Window When Not Launched by DoModal Peoplecode check box that appears on the Use tab on the Page Properties dialog box of the secondary page. You also control secondary page modality by using any of the DoModal* PeopleCode functions.

Important! Do not select the Disable Display in Modal Window When Not Launched by DoModal Peoplecode check box for fluid secondary pages. Fluid secondary pages must always be displayed in a modal window.

Example: Modal Secondary Page

In this example, the user clicks the Change password link to access the Change password secondary page in a modal window. The Change password page is displayed over the General Profile Information page, which is the primary page.

Image: Change password modal secondary page

This example illustrates the Change password modal secondary page.

Change password modal secondary page

Modeless Windows

In addition to modal secondary windows, you can create a modeless window. A modeless window is different from a modal window launched by any of the DoModal* functions in that its state is separate from that of the parent, launching component. When a modeless window is launched from a classic component using the TransferModeless function, the modeless window does not mask the parent window, which allows the user to update the modeless and parent window from the same browser session at the same time. However, when a modeless window is launched from a fluid component using either the ViewContentURLModeless or ViewURLModeless functions, the parent window is masked and cannot be accessed until the modeless window is dismissed. In this respect and from the user’s perspective, a modeless window launched from a fluid component operates similar to a modal window; but programmatically, its state is separate from that of the parent, launching component.

Similar to modal, secondary windows opened by any of the DoModal* functions, the modeless window does not include the browser title bar, browser menus, and the browser tool bars, status bar, and tool icons associated with most browser windows.

Note: While the title bar of a modeless window includes an X (or cancel) button, it cannot include any custom buttons.

Important! Only one active child modeless window can be open at one time. Therefore, after opening a modeless child window from the parent, you cannot open a second modeless child window from that modeless window. However, you can open a modal window from that modeless window.

Access the Page Properties dialog box for the page definition. (With the page open > select File > Definition Properties.)

Image: Page Properties dialog box: Secondary page type

This example illustrates the fields and controls on the Page Properties dialog box: Secondary page type. You can find definitions for the fields and controls later on this page.

Page Properties dialog box: Secondary page type

To define secondary pages:

  1. Select File > New and select Page from the New Definition dialog box.

  2. Right-click the page and select Page Properties to open the Page Properties dialog box.

  3. Select the Use tab.

  4. Select Secondary Page from the Page Type drop-down list box.

  5. Deselect the OK & Cancel buttons and the Close Box check boxes if you plan to develop alternative buttons that dismiss the page. To use the standard buttons, accept the default values.

    See Using Push Buttons and Links.

  6. Select the page size:

    Field or Control

    Definition

    Auto-Size

    Select to have PeopleSoft Application Designer size the page to accommodate the page controls that are defined therein. The right and bottom edges of the page move left and up, respectively, to eliminate any vacant space at the right side and bottom of the page. The top and left edges of the page are stationary, leaving any vacant space at the right side and bottom of the page.

    Custom Size

    Select to manually size the secondary page by dragging the edges or by entering the width and height in pixels.

  7. Select the page style sheet to associate with the secondary page.

    To override the application default style sheet, select a different style sheet from the drop-down list box. The style sheet that you select is available only for the controls on the secondary page.

  8. Select the page background.

    You can control the background of the page and any controls that do not have a style sheet associated with them by specifying a style in the page background.

  9. (Optional) Deselect Allow Deferred Processing if you want processing to occur each time the user presses the Tab key to advance through the page controls.

  10. (Optional) Select Adjust Layout for Hidden Fields if you want the page borders to adjust automatically to accommodate fields that are hidden.

    Note: For the page to adjust automatically, the hidden fields must be surrounded by open space or have other hidden fields to the right or left.

  11. (Optional) Select Disable Display in Modal Window When Not Launched by DoModal Peoplecode if you want the page to appear within the browser frame comparable to the standard application pages. If you select this option, you must use one of the DoModal* PeopleCode functions if you want the secondary page to appear as a modal page. Leave this check box deselected if you want the secondary page definition itself (not PeopleCode) to control the appearance.

    Important! Do not select the Disable Display in Modal Window When Not Launched by DoModal Peoplecode check box for fluid secondary pages. Fluid secondary pages must always be displayed in a modal window.

    Note: This option is disabled when the page type is set to Popup page.

  12. Click the OK button.

    The page definition size automatically adjusts if you set the page size to Auto-Size.

  13. Add other page controls as is appropriate for the relationship of the data on the secondary page to the primary page.

    Important! If you are using this secondary page in the context of a level 1 or greater row on the primary page, the first field on the secondary page definition needs to be from the context record of the row passed to the DoModal* PeopleCode function that is called to open the secondary page.

After you define a secondary page, you can place a secondary page control on your primary page and associate it with the secondary page you just created.

To insert a secondary page control, access the primary page:

  1. Select Insert > Secondary Page.

  2. Click the primary page where you want to display the secondary page control.

    The secondary page control looks like a small push button with the secondary page icon on it. This control is invisible at runtime.

  3. Double-click the control to access the Secondary Page Properties dialog box: Secondary Page tab.

  4. Select the name of the secondary page to associate with the secondary page control on the active page.

    Only secondary pages can be associated with secondary page controls. You cannot associate a standard page or subpage with the secondary page control.

  5. Select the Label tab.

    This label is for informational purposes only. It appears in the Order tab of the page definition and in the page description printout.

  6. Position the secondary page control at the proper scroll level on the Order tab.

    See Specifying Type Properties for Push Buttons or Links.

  7. Save the page definition.

Note: When you use secondary page controls on primary pages, you must also insert a push button control and write PeopleCode that invokes the secondary page.

You can use two page controls to associate a secondary page with a primary page:

  • Insert a push button or link page control on the primary page.

    When you use this control type, you must set the Type properties to invoke the secondary page. At runtime, when the user clicks the push button or link, the secondary page appears. Use this control when:

    • You need no procedural PeopleCode logic before the secondary page appears (PeopleCode can be used on the secondary page just like any other page).

    • You want to control the formatting of the information (therefore, you want to use a page and not use the Prompt function).

    • You use the secondary page multiple times.

    See Using Push Buttons and Links.

  • Insert a secondary page control on the primary page.

    This control looks like a command push button, but it is invisible at runtime. When you use a secondary page control, you must also insert and configure a push button on the primary page. After you set the push button Type properties to invoke Command PeopleCode, you then call any of the DoModal* PeopleCode functions from the FieldChange event for the push button to display the secondary page.

    See Inserting Secondary Page Controls.

    See Using Push Buttons and Links.

    See Modal Windows and Secondary Pages.