Creating a Custom Application Class

The custom application class that you implement has a one-to-one relationship to your dashboard header component. The dashboard header page must instantiate an object of this class in the page’s Activate event. Note the following design considerations for your custom application class:

The following example provides a simple implementation of PTNUI:Banner:BannerTile:

import PTNUI:Banner:BannerTile;

class MyBannerComp implements PTNUI:Banner:BannerTile
   method MyBannerComp(&hp_ID As string);
   method GetGroupletURL() Returns string;
   method SetDefaultContext();
   method GetBannerLabel() Returns string;
end-class;

method MyBannerComp
   /+ &hp_ID as String +/
   %Super = create PTNUI:Banner:BannerTile(&hp_ID);
   %This.AnnounceText = "One or more tiles has been updated.";
   rem %This.IsPersistContext = False;
end-method;

method GetGroupletURL
   /+ Returns String +/
   /+ Extends/implements PTNUI:Banner:BannerTile.GetGroupletURL +/
   Local string &url = GenerateComponentContentURL(%Portal, %Node, MenuName.MY_MENU, "GBL", Component.MY_DRIVERCOMP, "", "");
   Return &url;
end-method;

method SetDefaultContext
   /+ Extends/implements PTNUI:Banner:BannerTile.SetDefaultContext +/
   %This.SetKeyValue("SETID", "AUS01");
   %This.SetKeyValue("DESCR", "Default description");
end-method;

method GetBannerLabel
   /+ Returns String +/
   /+ Extends/implements PTNUI:Banner:BannerTile.GetBannerLabel +/
   Return "My Dashboard: Contextual Data Area";
end-method;

WARNING:

Do not clone or copy PTNUI:Banner:DefaultBannerTile to create your custom application class.