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

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.

Example

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.

Example

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.

Example

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.

Example

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.

Example

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.

Example

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.

Example

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.

Example

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.

Example

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.

Example

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.

Example

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.

Example