Creating a Custom Layout

To create a custom layout:

  1. Select PeopleTools, Mobile Application Platform, Layout Designer

  2. Select Add a New Value.

  3. Enter the layout name, custom layout checkbox and the parent layout name.

  4. Click Add.

  5. (Optional) Add an optional document.

  6. Click Create Custom layout.

  7. You will be prompted to save the layout.

  8. Use the Custom Layout to customize the delivered MAP layout.

Use the Add Layout page (IB_DOCLO_ADD) to add a new layout definition to the system.

To access the page select PeopleTools > Mobile Application Platform > Layout Designer. Click the Add a New Value tab. Select the Custom Layout checkbox.

Image: Add New Layout for Custom Layout

This example illustrates the fields and controls on the Add Layout page. You can find definitions for the fields and controls later on this page.

Add New Layout

Field or Control

Definition

Layout Name

Layout Name

Custom Layout

Selecting this checkbox indicates that this will be a custom layout and therefore displays the Parent Layout Name prompt edit field.

Parent Layout Name

All layouts that can be customized will show in the prompt list. Select the layout to customize.

Excluded from the list are:

  • Layouts that have been assigned to a Custom layout.

  • Layouts built using Rapid App Designer.

After clicking Add, the page to select an optional document to link to the custom layout is displayed.

Image: Select an optional document to link to the custom layout.

This example illustrates the fields and controls on the Select an optional document to link to the custom layout page.

Select an optional document to link to the custom layout

The user can assign an additional Document to this Customized Layout. The Document assigned to the Parent Layout Name should not be modifed. Modifications needed to perform the customization should be assigned to this Document.

Note: This assignment of a Document is optional and thus is not required in order to create a Customized Layout.

The Custom Layout displays the actual assigned Parent Document. The number of pages will correspond to the number of pages of that on the Parent layout.

Image: Custom Layout page

This example illustrates the fields and controls on the Custom Layout page. You can find definitions for the fields and controls later on this page.

Custom Layout page

Note the following on this page:

  • The Type is defined as Custom.

  • The customized Document assigned (if assigned) will be below the Parent Document.

  • There is no View Initialization URL. The Parent URL needs to be invoked to kick off the application.

  • There is no Security page. Security is set from the Parent.

  • Parent name is displayed to indicate the Layout associated with this Custom Layout.

Page Details will be read only for any page that was created upon initialization of the Layout, as these pages correspond to the pages from the Parent.

The user can add CSS/ Java Script to add/override styles or Java Script methods.

Layout Details

Expand the Layout Details section.

Image: Layout Details section

This example illustrates the fields and controls on the Layout Details section. You can find definitions for the fields and controls later on this page.

Layout Details section

Field or Control

Definition

Package

Displays the package name that contains the PeopleSoft document linked to the layout.

Document

Displays the name of the PeopleSoft document linked to the layout.

Version

Displays the version of the PeopleSoft document linked to the layout.

Description

Enter a description of the layout.

Details

Enter a more lengthy description of the layout.

Service

Displays the name of the system-generated REST service for the layout.

Related Actions

Defaults from the parent layout.

Group

Enter a group name to group layouts together. Layout search pages can search by group name to show a logical grouping of layouts.

Owner ID

From the drop-down list, select an owner for the layout.

Validation

Defaults from the parent layout.

Raphael

Defaults from the parent layout.

Document Dump

Defaults from the parent layout.

Bookmark

Defaults from the parent layout.

Retain State

Defaults from the parent layout.

Touch Image

If you are implementing an application for the Apple framework, select an image for the tile.

Exception Layout Name

Defaults from the parent layout.

Parent Layout Name

Name of the parent layout.

No Custom

Select this checkbox if you do not want to use any of these customizations in order to generate the Parent application. This is useful when a change occurs to the Parent (for example applying an update.) and you want to see the modifications made to the parent.

Initialization

The Initialization link will contain all the Layout Initialization information from the Parent. The user can add or modify any of these links for the purpose of adding additional pages to the application. The user can choose to add a Base Event Method if needed for these additional pages.

The Intialization parameters are copied over from the Parent. The developer can add additional parameters as the Document URI is built from what is defined on the Custom Layout. Events can be defined to override the Parent on the Parent PeopleCode page, the Document URI will be that of the Parent. The Custom Document URI is used where any additional Page(s) created on the Custom Layout are called from the appropriate element such as URL, Button, Listview , etc.

AJAX Event:

If a Custom Document was defined then if XML or JSON is selected for data return a checkbox called Use Custom Document will be displayed. This allows the return data to be either from the Parent or Custom defined Document.

Parent PeopleCode page

All People Code events defined on the Parent will be displayed on this page. The user can elect to add a Custom event to any or all these events. At runtime the Parent event will first get executed, the returned MAP object will then be the input MAP object to the subsequent defined Custom event. The user can then modify anything on the MAP object (document data, element styles etc.). This will be all wrapped in the same transactional boundary so any database updates can also be overridden.

Image: Parent PeopleCode page

This example illustrates the fields and controls on the Parent PeopleCode page. You can find definitions for the fields and controls later on this page.

Parent PeopleCode page

The same edits apply based on Event Type. Therefore the Application Class selected must be implemented by the proper interface IDocLayoutHandler in order for the Class ID to be available in the selection prompt. The Method(s) available in the prompt would then correspond to the proper Event Type signature: method xxxx(&Map As Map) Returns string.

If the developer wishes to only invoke the Custom defined event (instead of the Parent event first being executed), the Custom Event Only check box should be selected. At runtime only the Custom event will be executed.

Note: Adding additional Events is implemented the same way as a typical Layout. For example if an additional page was added to the Custom Document, then an OnInit method can be defined on the Base Event Method by selecting the Initialization link. In the case of OnInit Event Type the following execution order of methods would take place: Parent OnInitEvent, Custom OnInitEvent as defined on the Parent People Code page, and finally the OnInitEvent defined on the Custom Base Event Method.

If additional AJAX events are required for the customization, these can be added under the applicable element’s property page defined on the Custom Layout.

Copying Containers from Parent

For customizations where the actual elements defined on a page need to be modified, the user can copy over the container and make the changes. At runtime the Container defined on the Custom Layout would be used instead of what is defined on the Parent.

Image: Select a page/container to copy

This example illustrates the fields and controls on the Parent PeopleCode page.

Select a page/container to copy

For Custom layouts , Parent Layout is available.

Depending on the page shown and where the cursor is placed at the time of selection, the dropdown list will show all containers that can copied over to the associated Custom Page. Therefore, if the cursor was defined within the Header Section then only Containers defined on that page’s header section will be available to be copied.

Note: You cannot select a Container for customization if it contains a Save or Update Event. These events should be in their own Container or outside a Container. If a Save or Update is needed within a Container then an AJAX event should be used instead. Customizations for Update or Save events can still occur via People Code.

In Container Properties, under Optional Plugins, there is a property Use Parent.

Image: Container Properties – Optional Plug-In

This example illustrates the fields and controls on the Container Properties – Optional Plug-In page.

Container Properties - Optional Plug-In

Select the Use Parent checkbox to use the Parent Container (and its elements defined within) instead of what is defined on the Custom Container. This property can be also set via People Code for the Custom defined Container.

Adding Elements

All elements are except UPDATE or SAVE events can be added to a Custom Layout. The user can always add an AJAX event.

Additional Edits

You cannot delete a page on the Custom Layout if it was generated at intialization (associated Parent page). If the Parent page is subsequently deleted then the user can delete the associated Custom page

Validation occurs when the Custom Layout is first selected in the Layout Desgner. Validation will check for associated pages with the Parent, document references, initialization parameters from Parent and so forth.

Containers defined on Sub Page cannot be deleted if referenced on a Custom Sub Container. If a container copied from the parent contains sub containers then these containers will also be copied over to the correct Sub Page.