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:

  1. Access the Layout grid on the Layout Designer – Layout page.

    Select PeopleTools > Mobile Application Platform > Layout Designer. to access the page.

  2. Determine the position in the grid to add the page element.

  3. 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

    Current Row

    The Current Row button.

  4. Click the Add URL button on the Layout grid toolbar.

    Field or Control

    Definition

    Add URL

    The Add URL button.

After you click the button the URL page appears to define the element.

Image: URL page (Default view)

This example illustrates the fields and controls on the default view of the URL page. You can find definitions for the fields and controls later on this page.

URL page (Default view)

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:

http://www.example.com

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.

Image: URL page (Standard URL)

This example illustrates the fields and controls on the URL page when you are defining a standard URL. You can find definitions for the fields and controls later on this page.

URL page (Standard URL)

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

Image: URL page (Call REST Service)

This example illustrates the fields and controls on the URL page when you are defining a URL that calls a REST service.

URL page (Call REST Service)

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.

Image: URL page (Call Layout)

This example illustrates the fields and controls on the URL page when you are defining a URL to another Mobile Application Platform layout. You can find definitions for the fields and controls later on this page.

URL page (Call Layout)

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.

See Using the Layout Selection Page

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.)

Image: URL page (Internal Layout Page)

This example illustrates the fields and controls on the URL page when you are defining a URL that calls an Internal type layout page in the same layout. You can find definitions for the fields and controls later on this page.

URL page (Internal Layout Page)

Image: URL page (External Layout Page)

This example illustrates the fields and controls on the URL page when you are defining a URL that calls an External type page in the same layout. You can find definitions for the fields and controls later on this page.

URL page (External Layout 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.

See Using the Layout Selection Page

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.

Image: URL page (Call PeopleCode Update event)

This example illustrates the fields and controls on the URL page when you are defining a URL to call an PeopleCode Update event. You can find definitions for the fields and controls later on this page.

URL page (Call PeopleCode Update Event)

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.

See Using the Select URI Page

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.

Image: Layout Selection page (Default View for Call Layout URL)

This example illustrates the fields and controls on the default view of the Layout Selection page when you are defining a URL to another layout. You can find definitions for the fields and controls later on this page.

Layout Selection page (Layout)

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.

Image: Layout Selection page (Layout URI List grid populated)

This example illustrates the fields and controls on the Layout Selection page when the Layout URI List grid is populated. This is the default view of the page when you are defining a Layout Page URL. You can find definitions for the fields and controls later on this page.

Layout Selection (Layout URI List)

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.

Image: Layout Selection page (Layout URI List grid and URI Parameters grid populated)

This example illustrates the fields and controls on the Layout Selection page when the Layout URI List and URI Parameters grids are populated. You can find definitions for the fields and controls later on this page.

Layout Selection page (URI Parameters)

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.

Image: Layout Selection page (Defining URI Parameters)

This example illustrates the fields and controls on the Layout Selection page when defining URI parameters in the URI Parameters grid. You can find definitions for the fields and controls later on this page.

Layout Selection page (Defining URI Parameters)

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.

Image: URL element defined in the Layout grid

This example illustrates a URL page element defined in the Layout on the Layout Designer β€” Layouts page.

URL element defined in the Layout grid

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.