Understanding Layout Initialization
This section discusses default layout initialization in the Mobile Application Platform, as well as defining additional initialization parameters and values.
The Initialization page (Initialization link) features a Layout Initialization section where you define initialization parameters.and click the
By default, there is always one row which defines no parameters, as shown in the previous example. You’ll note the number 1 located to the right of the Description field. This is an index number, called a URI index, which the system assigns to each initialization parameter defined in the system.
By default the system passes the page ID and layout ID and you can view these values on the URI Document page (IB_DOCDISPLAY_SEC) by clicking the URI Document link.
The system builds URLs from the initialization parameters by appending the initialization index to the base URL. The base URL is defined by the REST target location that you set as a prerequisite for using the Layout Designer. For example:
When you click the View Initialization URL, the system generates a URL based on the default initialization parameter shown in the first example:
You can define additional parameters to pass in one or more URIs. The system displays the URIs that you define when you are working with page elements that allow URLs to be defined as properties, including URL, push button, and list view page elements.
By default no arguments are passed and you can examine the user ID to get context for the request to populate the Initialization event. However, adding additional parameters to the URL allows the Initialization event to use these to pass back data with respect to the parameters.
For example, if an additional parameter of Purchase_Order is passed, the Initialization event can read the purchase order and use that to populate the return document with additional information. The passing of additional parameters allows the layout to generate different context information.
If you are familiar with REST services, defining initialization parameters is similar to building URI templates.
When you define an initialization parameter you specify variables/primitive elements from the PeopleSoft document linked to the layout as parameter values. The parameter values are used to construct URLs at runtime.
When you build initialization parameters the system assigns a sequential integer index value to each parameter. You can use these URI indexes in PeopleCode to call and manipulate content.