(Click to open topic with navigation)
You can add a custom gadget to the Viewpoint Homepage by creating a new gadget entry in the gadgets.xml file and pointing it to the custom gadget URL. These steps explain how this is to be done.
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.acme.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 Editing 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 priority="30" height="1" width="2" /> <params> <param name="InternalRefresh" value="3600" /> <!-- Required for jQuery Data Load --> <param name="speed" value="fast" /> </params> <permission name="gadget.acme.customGadget.read" desc="Custom Gadget" /> </gadget>
Your changes will update automatically. No restart of Tomcat or of Viewpoint is necessary. However, you must log out of Viewpoint and log back in.
Related topics