Defining URL Page Elements
This topic discusses how to define URL page elements.
In the Mobile Application Platform you can define URL page elements to link to:
Standard URLs.
REST services.
Other Mobile Application Platform layouts.
Pages within a Mobile Application Platform layout.
Execute PeopleCode Update events.
You can create standard URL hyperlinks or define hot spot images.
This topic discusses how to define each of these URL types. When you are done defining a URL page element, you can define additional properties using the URL Properties page.
To add a URL page element to a page:
Access the Layout grid on the Layout Designer β Layout page.
Select
to access the page.Determine the position in the grid to add the page element.
Click the row directly above where you want to add the page element to make it the current row.
The Current Row icon (blue arrow) displays in the first column of the row to indicate that itβs the current row.
Field or Control
Definition
The Current Row button.
Click the Add URL button on the Layout grid toolbar.
Field or Control
Definition
The Add URL button.
After you click the button the URL page appears to define the element.
The fields and controls that you use to define a URL depend on the URL Type that you choose in the default view of the page.
Field or Control |
Definition |
---|---|
URL |
Click the radio button to define a standard URL, for example:
After you click the button, fields and controls specific to defining a standard URL appear. |
Call REST Service |
Click the radio button to define a URL to REST service. After you click the button, fields and controls specific to defining an external URL appear. |
Call Layout |
Click the radio button to define a URL to another Mobile Application Platform layout. After you click the button, fields and controls specific to defining an external URL appear. |
Layout Page |
Click the radio button to define a URL to a layout page in the current layout. After you click the button, fields and controls specific to defining an external URL appear. |
Update |
Click the radio button to define a URL that executes a PeopleCode Update event. After you click the button, fields and controls specific to defining an external URL appear. |
Add Image |
Select the control to add image that becomes the hot spot for the URL. |
Image Selector |
This link appears if you select the Add Image control. Click the link to access the Image Selector page to select an image. |
Image Name |
After you select an image using the Image Selector page, the image name appears in this field. |
Select Primitive |
Click the link to access the Select Primitive page to select an image defined as a primitive element to display dynamically. |
When defining a standard URL you can specify a fully-qualified URL or an anchor using an id attribute (#<id>).
Note: For cases were an icon is desired within a list item an anchor must be present. In this case simply use a "#" which will render <href = #> which will be then ignored as a link.
To define a standard URL click the URL radio button on the URL page.
When defining a standard URL, you can define a static URL or define a dynamic URL. To define a static URL, enter a value in the URL long edit box. To define a dynamic URL, check the Override URL box and then click the Select primitive for mapping link to select a primitive value for the URL.
Field or Control |
Definition |
---|---|
URL |
Enter the URL in the long edit box. |
Override URL |
Select the box to define a dynamic URL using a primitive element defined in the PeopleSoft document associated with the layout. You cannot override a URL for a Listview page element, however when working with a Listview element type an option is available to add JavaScript. |
Select primitive for mapping |
This link appears if you select the Override URL box. Click the link to access the Select Primitive page to select a primitive. |
Element Name |
If you define a primitive for the URL, the primitive element name appears in this field. |
You can define a URL to call provider or consumer REST services. When defining this URL type, you select the REST service operation, select the appropriate URI template, and then identify the variables to pass.
To define a URL that calls a REST service click the Call REST Service radio button on the URL page
Click the Select Rest Operation link to access the URI Selection page to build the REST URI.
See Using the URI Selection Page
After you build the URI an Operation field appears on the page that displays the name of the REST service operation.
When you define a URL to call another layout you must select the name of the layout to call, define the appropriate layout initialization to use, and identify the variables to pass.
To define a URL to call another layout click the Call Layout radio button on the URL page.
When you click the Call Layout radio button a Select Layout link appears. Click the link to access the Layout Selection page to select the layout to call.
Click the Layout Page radio button on the URL page to define a URL to call a page within the same layout.
The fields and controls that appear on the page depend on if you are defining a URL to a page defined as an Internal type page or an External type page. (You define the Internal and External page types using the Page Details page.)
Field or Control |
Definition |
---|---|
Page |
From the drop-down list select the number of the layout page to call. |
Select Layout |
This link appears when you select an External type page from the Page drop-down list. Click the link to access the Layout Selection page to select the layout to call. |
Post |
By default the external page is called via an HTTP GET. If data to be passed as arguments needs to be more secure, select the box to make the request via an HTTP POST. |
Click the Update radio button on the URL page to define a PeopleCode Update event to call.
Field or Control |
Definition |
---|---|
Map to URI |
Click the link to access theSelect URI page to select the URI parameters to pass to the Update event. The Select URI page displays the URIs defined as initialization parameters defined for the layout. |
URI |
After you define the URI parameters to pass using the Select URI page, the URI string displays in this field. |
Package |
Enter the name of the application package that contains the method to invoke. |
Path |
Enter the names of each sub-package in the application class hierarchy that define the location of the application class. Separate sub-package names by a colon. If the class is defined in the top-level application package, enter or select the colon. |
Class ID |
Enter the name of the application class that contains the method to invoke. |
Method |
From the drop-down list select the method to invoke. |
Use the Layout Selection page to:
Select a layout to call when you are defining a URL to call another layout.
Select a layout page to call when you are defining a URL to call another page within the same layout.
When you are working with either of these URL types, a Select Layout link appears on the URL page. Click the Select Layout link to access the page. The default view that appears depends on the URL type that you are defining.
After you define a layout to call, the Layout URI List grid appears and is populated with the URIs defined as initialization parameters for the layout.
When you are defining a URL to call a page in the same layout, the Layout Selection page appears with the Layout URI List grid populated, as shown in the following example.
For both Call Layout and Layout Page URL types, you must select a URI in the Layout URI List grid. If you select the default initialization URI, there are no additional configuration steps. When you select a URI other than the default initialization URI, the URI Parameters grid appears on the page, as shown in the following example.
In the URI Parameters grid, define the parameter values for the URI.
You can define constant or primitive values for the URI parameters. When you select the Constant control, a Const Value field appears where you enter the constant value. When you select the Primitive control, a Select Primitive link appears to access the Select Primitive page to define a primitive for the parameter.
Field or Control |
Definition |
---|---|
Layout Name |
When defining a URL to another layout, from the drop-down list select the name of the layout to which to link. If you are defining a URL to a page within the same layout, this field displays the name of the current layout. |
Dynamic URL |
Select the box for the system to determine the complete URL when the user clicks the link instead of at page initialization. When you select this link, the framework treat the link as an absolute external link, therefore will hide the automated Back button and disable any links created on the Layout Designer β Layout page on the layout or layout page being called. |
Select |
Select the box to select the corresponding URI in the REST Operations grid. |
Sequence |
Indicates the sequence for the selected URI, as defined in the in the service operation named in theOperation field. |
Description |
Displays the description for the URI as defined in the initialization parameters for the layout defined in the Layout Name field. |
URI Parameter Name |
Displays the name of the URI parameter. |
Constant |
Select the control to define a constant value for the parameter. When you select the control, a Const Value field appears where you can enter the constant value. |
Primitive |
Select the control to define a primitive value for the parameter. When you select the control, a Select Primitive link appears. Click the link to access the Select Primitive page to select a primitive value. |
Const Value |
This field appears when you select the Constant box. Enter a constant value for the URI parameter. |
(Primitive) Name |
If you define a primitive value for a parameter, the name of the primitive appears in the field. |
Select Primitive |
This link appears when you select the Primitive control in the URI Parameters grid. Click the link to access the Select Primitive page to define a primitive value for the parameter. |
URL page elements are indicated in the Layout grid by the mapurl_n element ID.
The system generates default text that appears in the Label Text field, URL_LINK_TEXT. This is the label text for the hyperlink at runtime, so you should enter a more meaningful and appropriate label.
If you have defined an image hot spot, leave the Label Text field blank unless you want a label to display for the image hot spot at runtime.
To define properties for a sidebar element click the Properties link to the right of the start element ID. Defining properties for sidebar elements is described in the next section.