ImageTile Class Methods
In this section, the ImageTile class methods are presented in alphabetical order. Because the FreeTextTile class is an implementation of the ImageTile class, these methods are also inherited by and apply to the FreeTextTile class.
Syntax
AddToHomePage(HP_NAME, behavior)
Description
Use the AddToHomePage method to add the current tile to the specified fluid homepage or fluid dashboard.
Parameters
Field or Control |
Definition |
---|---|
HP_NAME |
Specify the ID for the fluid homepage or fluid dashboard content reference definition as string value of up to 30 characters. Note: The ID cannot include spaces or special characters and must not begin with a number. |
behavior |
Specify the behavior for this tile as a four-character string value. |
The behavior parameter can have these values:
Value |
Behavior |
Description |
---|---|---|
4OPT |
Optional |
The tile is available to all users for users that have permissions to the tile, but it is not visible by default; users can add, move, or delete the tile. |
3DEF |
Optional default |
The tile is visible to all users by default for users that have permissions to the tile; users can move or delete the tile. Note: You must specify 3DEF if you wish to publish additional tiles to users who have already personalized this homepage or dashboard. See (Fluid only) Publishing Additional Tiles to Already Personalized Homepages or (Fluid only) Publishing Additional Tiles to Already Personalized Dashboards for more information. |
2REQ |
Required |
The tile is visible to all users by default for users that have permissions to the tile; users can move the tile, however, they cannot delete it. |
1FIX |
Required-fixed |
The tile is visible to all users by default for users that have permissions to the tile; however, users cannot move or delete it. |
Returns
None.
Example
Note: DEFAULT_LP is the ID for the My Homepage content reference definition.
import PTGP_APPCLASS_TILE:API:ImageTile;
Local PTGP_APPCLASS_TILE:API:ImageTile &t1 = create PTGP_APPCLASS_TILE:API:ImageTile("MY_TILE1");
&t1.AddToHomePage("DEFAULT_LP", "3DEF");
Syntax
Delete()
Description
Use the Delete method to delete this tile definition. This method deletes the tile from any fluid homepages and dashboards, deletes the content reference link definition for the tile, and deletes the tile’s Tile Wizard definition.
Parameters
None.
Returns
None.
Example
import PTGP_APPCLASS_TILE:API:ImageTile;
Local PTGP_APPCLASS_TILE:API:ImageTile &t1 = create PTGP_APPCLASS_TILE:API:ImageTile("MY_TILE1");
&t1.Delete();
Syntax
ImageTile(TILE_NAME)
Description
The ImageTile constructor is automatically invoked when you instantiate an object of the ImageTile class. It is also invoked as a superclass when you instantiate an object of the FreeTextTile class. The ImageTile method initializes the ImageTile object.
Parameters
Field or Control |
Definition |
---|---|
TILE_NAME |
Specifies the ID for the tile as string value of up to 30 characters. This represents the Tile Name of the tile definition in Tile Wizard. Note: The ID cannot include spaces or special characters and must not begin with a number. |
Returns
An ImageTile object.
Example
import PTGP_APPCLASS_TILE:API:ImageTile;
Local PTGP_APPCLASS_TILE:API:ImageTile &t1 = create PTGP_APPCLASS_TILE:API:ImageTile("MY_TILE1");
Syntax
Publish()
Description
Use the Publish method to publish a new tile definition and to re-publish any modifications made to an existing tile definition. The initial publication of a tile definition creates the content reference link definition in the portal registry.
Important! You must always save a new tile definition prior to publishing it.
Important! This method will fail if any of these properties are undefined: ImageName, TargetCrefName, or Title. However, for a FreeTextTile, the Content property is required instead of the ImageName property.
Parameters
None.
Returns
None.
Example
import PTGP_APPCLASS_TILE:API:ImageTile;
Local PTGP_APPCLASS_TILE:API:ImageTile &t1 = create PTGP_APPCLASS_TILE:API:ImageTile("MY_TILE1");
/* Set required properties. */
&t1.Title = "My Image Tile";
&t1.TargetCrefName = "PT_SC_PERS_DICT_FL_GBL"; /* My Dictionary */
&t1.ImageName = "PS_PREFERENCES_L_FL"; /* My Preferences image */
&t1.Save(); /* For a new tile definition, a save is required. */
&t1.Publish();
Syntax
Save()
Description
Use the Save method to perform an intermediate save of the tile definition in Tile Wizard. Invoking this method is required when you create a new tile definition. You must invoke the Publish method to make the tile definition available or to update an already published definition with modifications.
Important! This method will fail if any of these properties are undefined: ImageName, TargetCrefName, or Title. However, for a FreeTextTile, the Content property is required instead of the ImageName property.
Parameters
None.
Returns
None.
Example
&t1.Save();