(Click to open topic with navigation)
You can add a custom gadget to the Viewpoint Homepage by creating a new gadget entry in the homepage.xml file and pointing it to the custom gadget URL. These steps explain how this is to be done.
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 add a custom gadget to the Homepage
You could do the following:
When you create a permission like this, the actual permission name will be in this format: <type>.<resource>.<action> (or in this case, gadget.customGadget.read).
Any new gadget permission you create in MWS will appear in the Gadget Permissions when creating or editing roles. If you want to include the gadget permission in an existing role, you will have to edit the role and select the new custom gadget permission. For more information, see Modifying an existing role.
<gadget title="Custom Gadget" id="custom1">
<content type="url" href="http://www.example.com/customgadget" />
<params> <param name="speed" value="fast" /> </params>
Any name/value pairs you specify will be sent in the URL. For example: http://www.example.com/customgadget&speed=fast
For example, let's say you are creating a new custom gadget, and you want it to use custom parameters ("speed/fast" in this example). You also want to restrict which users will see the gadget on the Homepage, so you assign it the new "gadget.customGadget.read" permission you created in MWS (see step 1). This is how you would set up the xml:
<gadget title="Custom Gadget" id="custom1"> <content type="url" href="http://www.example.com/customgadget" /> <positioning column="3" priority="30" height="200" /> <params> <param name="speed" value="fast" /> </params> <permission name="gadget.customGadget.read"/> </gadget>
Your changes will update automatically. No restart of Tomcat or of Viewpoint is necessary.
Related topics