Understanding PeopleCode for the Mobile Application Platform

The Mobile Application Platform framework completely separates the business logic from the presentation layer.

Application classes are the primary methodology to use to add business logic and transaction data to a mobile application and to dynamically change the layout.

All metadata is available in the application class PeopleCode layer and is not tied to any mobile application page or other metadata, allowing you to override the defaults defined on layouts.

PeopleSoft delivers several objects and events for use in the application classes you build.

Use PeopleSoft Application Designer to create application classes for a Mobile Application Platform application.

This topic provides overview information and several examples of Mobile Application Platform PeopleCode. See the PeopleTools 8.55: PeopleCode API Reference, “MAP Classes” for detailed information about the MAP API.

All Mobile Application Platform application classes must be derived from the IDoclayoutHandler interface, located in the PS_PT application package in PeopleSoft Application Designer.

Three objects are delivered for the Mobile Application Platform framework:

Field or Control

Definition

Map

High-level object as input for the MAP PeopleCode events. The Document object, which contains the business logic shape definition and the URI document can be accessed from this object.

MapPage

Page object which can be retrieved from the Map object.

MapElement

Element object defined on the page. The MapElement object can be retrieved via the Map object or MapPage object.

In addition, the IntBroker object features several methods and properties to support the framework.

The four events currently supported by the framework are described in the following table:

Event

Event Name

Description

Initialization

OnInitEvent

This event populates the application with data when the application or external page is initialized. Specify this event in the Base Event Method section of the Initialization page. (PeopleTools, Mobile Application Platform, Layout Designer and click the Initialization link.)

Update

OnUpdateEvent

You can use the Update event and pass optional parameters to update the page The Update event is invoked every time an element is selected that has an Update event declared via the Get HTTP method. The current elements that can have an Update event are: URL, List view and Button. Specify this event in the properties page for an element.

Ajax

NA

You can invoke an Ajax event on any page element and you specify the even on the properties page for an element. In the element properties you provide the JavaScript event and function, and the application class to invoke. Use the Layout Designer – JavaScript page to code the JavaScript. See the Using Ajax Events in the Mobile Application Platform.

Save

OnSaveEvent.

You can invoke the Save event on the Button element. The Save event gets fired every time the application is invoked via the POST HTTP method when the Save option is selected. Specify this event in the properties page for the Button element.