Page Class

This chapter provides an overview of Page class and discusses the following topics:

Click to jump to parent topicUnderstanding Page Class

Use the page class to manipulate a page in a component. The most common use of this class is to hide or display a page in a component, either based on field values or the level of security of the user.

Generally, the PeopleCode used to manipulate a page object is associated with PeopleCode in the Activate event.

Note. The page object should not be used until after the page processor has loaded the page: do not instantiate this object in RowInit PeopleCode, use it in PreBuild, PostBuild or Activate instead.

In addition, if you need to hide the current page, PeopleSoft recommends using the PreBuild event for your program.

See Also

Component Build Processing in Update Modes

Click to jump to parent topicShortcut Considerations

An expression of the form

PAGE.pagename.property

is equivalent to GetPage(PAGE.name).property. For example, the following two lines of code are equivalent:

PAGE.MANAGER_APPROV.DisplayOnly = False; GetPage(PAGE.MANAGER_APPROV).DisplayOnly = False;

Click to jump to parent topicData Type of a Page Object

Use the Page data type to declare Page objects. For example,

Local Page &MYPAGE;

Click to jump to parent topicScope of a Page Object

A page object can be instantiated from PeopleCode only.

Use this object only in PeopleCode programs that are associated with an online process, not in an Application Engine program, a message subscription, a Component Interface, and so on.

In addition, the page object should not be used until after the page processor has loaded the page: do not instantiate this object in RowInit PeopleCode. Use it in PostBuild or Activate instead.

Click to jump to parent topicPage Class Built-in Function

GetPage

Click to jump to parent topicPage Class Properties

In this section, we discuss each Page class properties.

Click to jump to top of pageClick to jump to parent topicCopyURLLink

Description

Use this property to enable the http link for a component. Clicking this link copies the address (URL) of the page to the clipboard. This is a Pagebar property.

Note. If you select the Disable Pagebar checkbox for the component in Application Designer, you cannot set any of the Pagebar properties using PeopleCode. If you deselect the Copy URL Link checkbox for the component in Application Designer, you can still set this option using this property.

This property is read-write.

See Also

Setting Use Properties

Click to jump to top of pageClick to jump to parent topicCustomizePageLink

Description

Use this property to enable Customize Page link for a component. Clicking this link enables the user to control the initial display of the component. This property takes a Boolean value, true, the user can control the display, false otherwise. This is a Pagebar property.

Note. If you select the Disable Pagebar checkbox for the component in the Application Designer, you cannot set any of the Pagebar properties using PeopleCode. If you deselect the Customize Page Link checkbox for the component in Application Designer, you can still set this option using this property.

This property is read-write.

See Also

Setting Use Properties

Click to jump to top of pageClick to jump to parent topicDisplayOnly

Description

Use this property to make a page display-only, or to enable a page so the fields can be edited. This property takes a Boolean value: True if the page is display-only, False otherwise.

Note. You cannot enable or disable the current page.

The value of DisplayOnly for a page is restored to the value set in Application Designer when the user goes to another component. This means you must set DisplayOnly for the page each time a component is accessed.

This property is read-write.

Example

If &MYPAGE.DisplayOnly Then &MYPAGE.Visible = True; Else &MYPAGE.Visible = False; End-If;

Click to jump to top of pageClick to jump to parent topicHelpLink

Description

Use this property to enable the Help link for a component. Clicking this link accesses the online help PeopleBook entry for the current page. This is a Pagebar property.

Note. If you select the Disable Pagebar checkbox for the component in the Application Designer, you cannot set and of the Pagebar properties using PeopleCode. If you deselect the Help Link checkbox for the component in Application Designer, you can still set this option using this property.

This property is read-write.

See Also

Setting Use Properties

Click to jump to top of pageClick to jump to parent topicName

Description

This property returns a reference to the page name definition (a string value.)

This property is read-only.

Example

&MYPAGENAME = &MYPAGE.Name;

Click to jump to top of pageClick to jump to parent topicNewWindowLink

Description

Use this property to enable New Window link for a component. Clicking this link opens a new browser window with the search page for the current component. Users can view or enter data in the new window. This is a Pagebar property.

Note. If you select the Disable Pagebar checkbox for the component in the Application Designer, you cannot set any of the Pagebar properties using PeopleCode. If you deselect the New Window Link checkbox for the component in Application Designer, you can still set this option using this property.

This property is read-write.

See Also

Setting Use Properties

Click to jump to top of pageClick to jump to parent topicVisible

Description

Use this property to set the visibility of a page. If this property is set to True, the page is visible. If this property is set to False, the page is not visible. When the visibility is changed, the component tabs and menus are also automatically changed to reflect the new settings. Menus and tabs return to their original values when the user navigates to another component. In addition, if a page is set to be hidden in the component definition, you can change the value of the page to be visible at runtime.

Oracle recommends using the PreBuild event if you need to hide the current page.

Important! Page visibility alone (as set by the Visible property) does not determine whether a user can see a page. Visibility plus the permissions to access the page together determine whether a specific page is displayed to a particular user.

Example

In the following example, a page is hidden based on the value of the current field.

If PAYROLE_TYPE = "Global" Then PAGE.JOB_EARNINGS.Visible = False; End-If;

See Also

Setting Page Permissions

Setting Page Attributes