DynamicLoader Class Methods

In this section, the DynamicLoader class methods are presented in alphabetical order

Syntax

AddTileToSection(Tile)

Description

Use this method to add the newly created tile to the section within the homepage (passed in parameters of constructor).

Parameters

Parameter

Description

Tile

Specifies the tile to be added to a section.

Returns

None.

Example

&oTile = %This.CreateTileUsingTab("", "MY_SECTION");
   &oTile.RowNum = %This.GetNextRowNumber();
   &oTile.GltImageName = Image.MY_IMAGE;
   %This.SetupFluidTarget(&oTile, GenerateComponentContentURL(%This.Tab.PortalName, %This.Tab.NodeName, MenuName.MY_MENU, %Market, Component.MY_COMPONENT, Page.MY_PAGE1, %Action_UpdateDisplay));
   %This.AddTileToSection(&oTile);

Syntax

AdjustAccessibilityByStyle(&oTile As PTNUI:Model:Tile)

Description

Use this method to adjust accessibility-related properties on tiles and section-action buttons based on section's PS_STYLECLASSES attributes or tile's PS_STYLECLASSES attributes. For example, in the case of buttons with the tile style of psc_section-action-button, the tile is identified as a button with these properties (IsNotTile, IsRoleButton, and UseAltText) set to true.

Parameters

Parameter

Description

&oTile

Specifies a tile object reference.

Returns

None.

Syntax

CreateTile(Node_name, Portal_name, Tile_name, Tile_label)

Description

Use this method to create a tile object, which can be further modified by applications code and added to a section on a homepage. If the tile name is not provided, it is dynamically generated with the DYN prefix followed by a number (zero filled).

Parameters

Parameter

Description

Node_name

Specifies the name of the node as a String value.

Portal_name

Specified the portal name as a String value.

Tile_name

Specifies the tile name as a String value.

Tile_label

Specifies the tile label as a String value.

Returns

A tile object.

Syntax

CreateTileUsingTab(Tile_name, Tile_label)

Description

Use this method to create a tile object with the node of the homepage and portal information. The tile object can be further modified by applications code and added to a section on the homepage. If the tile name is not provided, it is dynamically created with a DYN prefix followed by a number (zero filled).

Parameters

Parameter

Description

Tile_name

Specifies the tile name as a String value.

Tile_label

Specifies the tile label as a String value.

Returns

A tile object.

Syntax

GenerateLocalURL(URL_Fragment, new_window)

Description

Use this method to generate a URL based on the ContentURI property of the request object. The URL is manipulated based on the new_window parameter and appends the URL_fragment parameter to the URL.

Parameters

Parameter

Description

URL_Fragment

Specifies a fragment of an URL.

new_window

Specifies whether the URL should be opened in a new window as a Boolean value.

Returns

A URL as a String.

Syntax

GenerateTileName()

Description

Use this method to generate a tile name. The tile name is generated based on the number of dynamically named tiles created previously in this instance. By default, the tile name is prefixed with DYN followed by a 6-digit number (zero filled).

Parameters

None.

Returns

A tile name as a String.

Syntax

GetConfigData()

Description

This method returns all initialized data configurations. The initialization parameter determines whether all settings or a subset of settings are returned.

Parameters

None.

Returns

An array of array of strings for all data configurations as name-value pairs.

Syntax

GetConfigDataByName(config_data_name)

Description

Use this method to retrieve specific data configurations after initialization. If you want to retrieve all data configurations, use the GetConfigData method.

Parameters

Parameter

Description

config_data_name

Specifies a data-configuration name as a String value.

Note: You should enter the style class-based data configuration without the data_ prefix.

For style class-based data configurations, see Using Delivered PeopleTools Section Templates.

Returns

A String representing the value of the specified data configuration.

Syntax

GetNextRowNumber()

Description

When the dynamic loader is instantiated, the largest row number of any statically defined (through the Homepage CREF) for the section is stored. Use the GetNextRowNumber method to return the next row to be used so that tiles appear in the order in which they are defined. If any statically defined tiles exist on a section, these tiles seed the starting number.

Parameters

None.

Returns

A number of the next row in a section.

Syntax

InitConfigData(NULL)OR configdata_names as an array of Strings

Description

This method looks for data configurations within a section's PS_STYLECLASSES and returns configurations based on the parameters.

Parameters

Parameter

Description

NULL or configdata_names

Specify NULL to return all data configurations.

OR

Specify data configurations as an array of Strings.

Returns

An array of array of strings of configuration data as a name-value pair.

Syntax

LoadSection()

Description

Use this method to load a section with tiles.

Parameters

None.

Returns

None.

Example

method LoadSection
   /+ Extends/implements PTNUI:Dynamic:DynamicLoader.LoadSection +/
   /*AddOnLoadScript("console.log(""LoadSection for "",""" | EscapeHTML(%This.Section.SectionName) | """);"); */
   Local PTNUI:Model:Tile &oTile;
   
   &oTile = %This.CreateTileUsingTab("", "Team Calendar");
   &oTile.RowNum = %This.GetNextRowNumber();
   &oTile.GltImageName = Image.QE_TEAM_CALENDAR;
   %This.SetupFluidTarget(&oTile, GenerateComponentContentURL(%This.Tab.PortalName, %This.Tab.NodeName, MenuName.MYMENU, %Market, Component.MY_COMPONENT, Page.MYPAGE, %Action_UpdateDisplay));
   %This.AddTileToSection(&oTile);
end-method;

Syntax

SetBehaviorDefault(Tile)

Description

Use this method to set the tile properties correctly for the Optional/Default tile behavior type. The default tile behavior type is Optional.

Parameters

Parameter

Description

Tile

Specifies a tile.

Returns

None.

Syntax

SetBehaviorFixed(Tile)

Description

Use this method to set the tile properties correctly for the Required/Fixed tile behavior type. The default tile behavior type is Optional.

Parameters

Parameter

Description

Tile

Specifies a tile.

Returns

None.

Syntax

SetBehaviorRequired(Tile)

Description

Use this method to set the tile properties correctly for the Required tile behavior type. The default tile behavior type is Optional.

Parameters

Parameter

Description

Tile

Specifies a tile.

Returns

None.

Syntax

SetDefaultTileImage(Image_Name)

Description

Use this method to set the default tile image to be used if no tile image is specified explicitly when creating the tile using the DynamicLoader application class. In the case of the Recently Visited section, this image will be used for every entry within the section definition.

Parameters

Parameter

Description

Image_Name

Specifies an image for the tile as a String value.

Returns

None.

Syntax

SetTileNamePrefix(Prefix)

Description

Use this method to set the prefix to the desired string for a dynamic tile name. The prefix should not be more than 24 characters, and it cannot contain spaces.

The default prefix for dynamic tiles is DYN.

If the prefix string is invalid or if the prefix is an empty string, an error is not displayed. The default prefix (DYN) is used.

Parameters

Parameter

Description

Prefix

Specifies the prefix for a tile name as a String value.

Note: The prefix should not be more than 24 characters, and it cannot contain spaces.

Returns

None.

Syntax

SetupClassicTarget(Tile, URL)

Description

This method sets up the tile object properly for a given type of URL context (Classic) and uses the URL to populate GltContentActionURL or GltPortalActionURL, the target which is launched when a user selects the tile.

Parameters

Parameter

Description

Tile

Specifies a tile, which a user selects to launch the target content.

URL

Specifies the URL of the target content.

Returns

None.

Syntax

SetupExternalTarget(Tile, URL)

Description

This method sets up the tile object properly for a given type of URL context (External) and uses the URL to populate GltContentActionURL or GltPortalActionURL, the target which is launched when a user selects the tile.

Parameters

Parameter

Description

Tile

Specifies a tile, which a user selects to launch the target content.

URL

Specifies the URL of the target content.

Returns

None.

Syntax

SetupFluidTarget(Tile, URL)

Description

This method sets up the tile object properly for a given type of URL context (Fluid) and uses the URL to populate GltContentActionURL or GltPortalActionURL, the target which is launched when a user selects the tile.

Parameters

Parameter

Description

Tile

Specifies a tile, which a user selects to launch the target content.

URL

Specifies the URL of the target content.

Returns

None.

Example

Local PTNUI:Model:Tile &oTile;   
   
   &oTile = %This.CreateTileUsingTab("", "XYZ");
   &oTile.RowNum = %This.GetNextRowNumber();
   &oTile.GltImageName = Image.MYIMAGE;
   %This.SetupFluidTarget(&oTile, GenerateComponentContentURL(%This.Tab.PortalName, %This.Tab.NodeName, MenuName.MY_MENU, %Market, Component.MY_COMPONENT, Page.MY_PAGE1, %Action_UpdateDisplay));

Syntax

SetupGenericTarget(Tile, URL)

Description

This method sets up the tile object properly for a given type of URL context (Generic) and uses the URL to populate GltContentActionURL or GltPortalActionURL, the target which is launched when a user selects the tile.

Parameters

Parameter

Description

Tile

Specifies a tile, which a user selects to launch the target content.

URL

Specifies the URL of the target content.

Returns

None.