Defining Layout Initialization Parameters and Values
This section discusses how to define layout initialization parameters and values.
You must add a row to begin defining initialization parameters. After you define the parameter, add arguments by clicking the Add Parameter link.
In the Description field add information that describes the parameters to pass and the data returned as a result. This is important because the information will assist other developers determine whether to call the layout from their layouts.
The parameter values/arguments you specify are primitive elements defined in the PeopleSoft document linked to the layout, or constants that you define.
Important! The order in which you add parameter values is important, as that is the order in which the system constructs the URL.
If the parameter to pass is a primitive click the Select Primitive link to access the Select a Primitive page and click the appropriate element.
After you select a primitive from the document tree, the Layout Initialization page appears as shown in the following example:
You’ll note that the system assigns an index of 2 to the parameter and the generated URL for this initialization parameter and value is:
To add additional parameter values click the Add Parameter link. Another row appears in the Parameter List section.
After you’ve completed defining all values for the parameter, click the OK button. The Layout Designer – Layout page appears. Then, click the Save button to save the changes to the layout.
This section discusses using constants for initialization parameter values.
Understanding Using Constants for Initialization Parameter Values
For the Mobile Application Platform framework to determine which URI is called, all URIs must be unique.
The following example shows two URIs that are not unique:
/<PAGE_ID>/<LAYOUT_ID/<primitive state> /<PAGE_ID>/<LAYOUT_ID/<primitive city>
If the following values were passed in, the framework would be unable to determine to which URI these values belong:
A simple solution for this problem is to use a constant for one of the URIs as shown below:
When the URI /2/12/State/Kansas City is passed in, the framework will be able to determine the proper URI and properly populate the URI document within the MAP object. You can now properly get this initialization/URI index from the MAP Object.
Defining Constants for Initialization Parameter Values
If a parameter value is a constant, enter the constant name in the Name field. This example shows adding a list of parameters, including a constant:
In this example, the first parameter value, state, is a constant and the second value, city, is a primitive selected from the Select a Primitive page. The URL the system generates from the parameter list values is:
To add a layout initialization parameter:
Access the Layout Initialization section of the Initialization page. (Select Initialization link.)and click the
In the Layout Initialization Parameters section, click the Add a Row button (+).
In the Description field enter a description of the parameter.
Click the Add Parameter link.
In the Name field enter a parameter value.
To define a constant, enter it in the field.
To define a primitive, click the Select Primitive field to access the Select a Primitive page and select the primitive to add.
To add additional parameter values, repeat Steps 4 -5.
Click the OK button. The Layout Designer – Layout page appears.
Click the Save button.
To better illustrate defining initialization parameters, consider an example where the following PeopleSoft document is defined for a layout:
The following parameters are defined on the Layout Initialization Parameters page:
In this case, four URI templates are created for the layout to use when mapping the record data on a list view or table.
To see rows of data in a list view of QE_ARMAMENT record data, select the compound element QE_ARMAMENT to map to the list view and the URL selected becomes an external page where the URI template selected is Layout Initialization 2. The key data define in the primitive element QE_ACNUMBER is passed as part of the URL. The resulting external page has a list view defined with the compound QE_WPN_PRESETS to map to the list view, and the URL selected is an external page where the URI Template selected is Layout Initialization 3. The key data defined in primitive QE_ACNUMBER and QE_STATION_NBR are passed as part of the URL. This sort of pattern can be used to show the data for compound QE_STAT_CONFIG.