3.3 Configuring Homepage gadgets
You can configure the Viewpoint Homepage to display gadgets (for a list of Viewpoint gadgets, see Supported Homepage gadgets).
The configuration for Homepage gadgets does not follow Google Gadgets API, but you can embed inline frames into the homepage. Because the Google Gadget API permits the use of HTML iframes, Gadgets that are configured for Homepage can be altered to work in any Gadget API-compatible dashboard (such as the WS02 Gadget Server).
To configure gadgets on the Homepage
- Open core.xml in the Viewpoint home directory and locate the <home-page> element.
- Insert the <module> element for each gadget you wish to add to the page.
- Insert the <module-prefs> child element to specify the gadget’s title and height in pixels (the width adjusts automatically according to the width of the browser). For example:
<module-prefs title="Jobs Needing Attention" height="350" />
- Insert the <content> element to provide gadget-loading information. Specify the type (only ‘url’ is currently implemented in Homepage) and the href, setting the value to the location of the gadget’s HTML page. For example:
<content type="url" href="jsp/dashboard/tables/jobs_needing_attention.jsp" />
- Insert the <positioning> element to specify the location of the gadget on the Homepage (for details, see Arranging gadgets on the Homepage).
- Insert the <user-pref> element. Note that ‘url’ gadgets can only have a refresh preference set.
- Give the preference a name.
- Set a default_value for the preference. For refresh, the default value must be an integer specifying the number of seconds between each time the gadget is refreshed.
- Specify the preference’s datatype. For refresh, the datatype must be set to "hidden".
- Indicate whether the preference is required. For refresh, required must be set to "true".
For example:
<user-pref name="needingAttention" default_value="true" datatype="hidden" required="true" />
- Set the <permission> element to restrict who may view the gadget. For a list of permission names, see Setting permissions.
For example:
<permission name="nav.homepage" />
In this example, a user must have the nav.homepage permission in order to view the gadget.
Related topics