Overriding Default Page Style Properties

Unless you override the default style sheet at the page level, the browser renders all pages and page fields based on the default style classes that comprise the application style sheet. If you want to use different styles to create subtle changes or entirely unique pages, you can override styles at the page and page field levels.

This section discusses how to:

  • Override the default page style sheet.

  • Override the default page background style.

  • Override default page field styles.

You can override the default page style sheet by accessing the page properties dialog box of any PeopleSoft page. When you override the default page style sheet, you are not changing the default style classes for the page; you are indicating to the system to select the default style classes from a nondefault style sheet. Note these points when overriding the page style sheet:

  • Changing the page style sheet overrides the default style sheet only for the selected page.

  • Only the custom and default style classes that comprise the current page style sheet—whether default or override—are available for use by the page and its elements. Style classes on other style sheets are inaccessible.

  • If you select a page style sheet that comprises only free form sub style sheets, the system constrains all subordinate page elements to their default style classes.

  • If you select a page style sheet that comprises only free form sub style sheets, the page designer renders the page using the application style sheet, not the free form style sheet.

To override the default page style sheet:

  1. Open the page in PeopleSoft Application Designer.

  2. Select File > Definition Properties to access the Page Properties dialog box.

  3. Select the Use tab.

  4. Click the Page Style Sheet drop-down list box and select a style.

  5. Click the OK button and save the page.

  6. Select Layout, View in Browser to preview the page.

    Unlike the page designer view, this option renders the page with all style classes, including free form styles.

The page background derives from the Background tab of the PSPAGE style class contained in the current page style sheet, whether default or override. You can override the default page background style.

Note these points about changing the default value of the page background style:

  • Changing the page background style value for a specific page overrides the background properties of only the current page.

  • If the current page style sheet comprises only free form sub style sheets, the system constrains the page background style to the default style class.

  • The Page Background Style drop-down list box displays only the style classes that comprise the current page style sheet, whether default or override. Style classes that do not appear in the current page style sheet do not appear in the list.

To override the default page background style:

  1. Open the page in PeopleSoft Application Designer.

  2. Select File > Definition Properties to access the Page Properties dialog box.

  3. Select the Use tab.

  4. Click the Page Background Style drop-down list box and select a style.

  5. Click the OK button and save the page.

  6. Select Layout > View in Browser to preview the page.

    Unlike the page designer view, this option renders the page with all style classes, including free form styles.

You can override the default style of most page field controls, such as edit boxes, drop-down list boxes, and so on. Many page field controls include a separate label style that enables you to override the label style independent of the control style itself.

Note these points about changing the default style of a page field:

  • The Style drop-down list box displays only the style classes that comprise the current page style sheet, whether default or override. Style classes that do not appear in the current page style sheet do not appear in the list.

  • If the page style sheet comprises only free form sub style sheets, then the system constrains all page field controls to the default style despite the Style field value.

To override the default page field style:

  1. Open a page in PeopleSoft Application Designer.

  2. Double-click the page field control to access the Properties dialog box.

  3. Select the Record tab.

  4. Click the Style drop-down list box and select a new style.

  5. Click the Label tab.

  6. Click the Style drop-down list box and select a new style.

  7. Select Layout > View in Browser to preview the page.

    Unlike the page designer view, this option renders the page with all style classes, including free form styles.

  8. Save the page.

In addition to setting the style property at design time, you can also use the PeopleCode Field object Style property to programmatically change the style class of a field at runtime.

See Using the Field Object Style Property.