Friday, April 14, 2017

Fluid UI - Tile Wizard API - Part 2 - Dynamic Tile Images

This post is a continuation of my previous article on the Tile Wizard API, where I described how we can use the Tile Wizard API to dynamically update the Tile Content.

In this post, we will see how we can use the Tile Wizard API for another similar and more common use case to display a dynamic image based on certain conditions.

For the purposes of this post, let us assume that we want to create a Tile called 'My Team' that displays a different image and live data based on the user's security role assignment.


Tile Wizard Setup:

NavBar > PeopleTools > Portal > Tile Wizard > Create Tile

App Package PeopleCode Implementation:

PeopleCode for Reference:

import PTGP_APPCLASS_TILE:Tiles:Tile;

class TILE_2 extends PTGP_APPCLASS_TILE:Tiles:Tile
   method TILE_2();
   method getTileLiveData();

method TILE_2
   %Super = create PTGP_APPCLASS_TILE:Tiles:Tile();

method getTileLiveData
   /+ Extends/implements PTGP_APPCLASS_TILE:Tiles:Tile.getTileLiveData +/
   If IsUserInRole("SV_CSK") Then
      rem %This.setTileImageRef("SV_CSK"); /* Method equivalent */
      %This.ImageReferenceField.Value = Image.SV_CSK;
      /* Live Data */
      %This.TileLiveData_1 = "Chennai Super Kings";
   If IsUserInRole("SV_RCB") Then
      rem %This.setTileImageRef("SV_RCB"); /* Method equivalent */
      %This.ImageReferenceField.Value = Image.SV_RCB;
      /* Live Data */
      %This.TileLiveData_1 = "Royal Challengers Bangalore";


  1. how to migrate tile wizard

    1. Refer following document on My Oracle Support:

      E-FLUID : Migrate Fluid Tile (Doc ID 2213853.1)

      You can use Data Migration WorkBench to migrate Tile Wizard tiles. PTPPB_GROUPLET is the delivered data set definition to migrate Tile Wizard data.

      Navigation : Peopletools -> Lifecycle Tools -> Migrate Data -> Data Migration WorkBench

  2. Where are the images - Image.SV_CSK and Image.SV_RCB placed?

    I am trying to do the example stated here; so would like to know the place where these images are placed?

    1. I uploaded the images (SVG format) using the Branding Objects page.
      PeopleTools > Portal > Branding > Branding Objects (Images)

  3. We have created a custom tile that just displays few external links into it. But we are noticing that Image link and the description are not coming up in the same line. Any thoughts ?