Creating Tiles

This topic briefly describes the process of creating tiles and points you to existing documentation. In addition to creating tiles using the tile wizard or creating tile definitions manually, you can create tiles dynamically and load them into a section.

Creating Tiles Statically

You can create a tile using the Tile Wizard or you can manually create tile content references.

Refer to the following topics for more information on creating tiles: Using Tile Wizard and Creating and Maintaining Tile Definitions Manually.

Creating Tiles Dynamically

You can create tiles dynamically and load these tiles into a section using the delivered base class: PTNUI:Dynamic:DynamicLoader. As these tiles are dynamically created, they do not have a tile content reference.

Typically, you would create tiles dynamically in this manner:

  • Create an application class, which is an extension to the base class PTNUI:Dynamic:DynamicLoader.

  • Use the LoadSection method to load a section.

  • Use the CreateTile or CreateTileUsingTab methods to define a tile.

  • Use the AddTileToSection method to add the tile to the section.

The following code snippet creates a standard tile with title and image:


method LoadSection
   /+ Extends/implements PTNUI:Dynamic:DynamicLoader.LoadSection +/
   Local PTNUI:Model:Tile &oTile;
   &oTile = %This.CreateTileUsingTab("", "Team Calendar");
   &oTile.RowNum = %This.GetNextRowNumber();
   &oTile.GltImageName = Image.TEAM_CALENDAR;
   %This.SetupFluidTarget(&oTile, GenerateComponentContentURL(%This.Tab.PortalName, %This.Tab.NodeName, MenuName.MYMENU, %Market, Component.MYCOMPONENT, Page.MYPAGE, %Action_UpdateDisplay));
   %This.AddTileToSection(&oTile);   
end-method;

For a detailed description of the DynamicLoader class and its methods, see PeopleCode API Reference: DynamicLoader Class Methods.