Implementing an Application Class for Tile Content

To implement an application class for tile content, do the following in your application class definition:

  1. Import the base class (also referred to as the superclass):

    import PTGP_APPCLASS_TILE:Tiles:Tile;
  2. In the class declaration, do the following:

    1. Indicate that your class (the subclass) extends the base class.

    2. Declare the constructor method for your class.

    3. Declare the required getTileLiveData method.

    4. (Optional) Declare any additional private methods and properties required by your implementation.

      class My_Tile extends PTGP_APPCLASS_TILE:Tiles:Tile
         method My_Tile();
         method getTileLiveData();
      end-class;
  3. In the constructor method for your class, instantiate an object of the superclass:

    method My_Tile
       %Super = create PTGP_APPCLASS_TILE:Tiles:Tile();
    end-method;
  4. In your implementation of the required getTileLiveData method, do the following:

    1. (Optional) Override the content type by invoking one of the optional SetTileContentAs* methods.

    2. (Optional) Override whether live data is displayed on the tile by invoking the setTileLiveData method or setting the hasLiveDataDescr property.

    3. (Optional) Override whether badge data is displayed on the tile by invoking the setTileHasCount method or setting the hasLiveDataCount property.

    4. For the tile content type selected, invoke any require methods and set all required properties for that content type. See Properties and Methods Required by Tile Content Type for more information.

    5. If live data is enabled for the tile, set all required properties for live data. See Live Data for more information.

    6. If badge data is enabled for the tile, set all required properties for badge data. See Badge Data for more information.

    7. (Optional) Implement error handling by setting the hasContent property.

  5. Create a tile definition in Tile Wizard. At Step 2, specify your custom application class.

Each tile content type requires that you set required properties or invoke certain methods.

Chart

When you select the chart content type, use these properties and methods:

Chart and 1 KPI

When you select the chart and 1 KPI content type, use these properties and methods:

1 KPI

When you select the 1 KPI content type, use these properties and methods:

2 KPIs

When you select the 2 KPIs content type, use these properties and methods:

HTML Area

When you select the HTML area content type, use these properties and methods:

Image

When you select the image content type, use these properties and methods: