Adding OpenSocial gadgets to the palette when the catalog is not installedAdded by IBM on May 19, 2011 | Version 1 (Original)
|When working in an environment in which the catalog is not installed, you can add new gadgets to the OpenSocial category in the palette by adding URL references to the OpenSocial category in the catalog_default.xml file on the server. This topic describes the required steps for add the gadgets.
When working in an environment in which the catalog is not installed, you can add new gadgets to the OpenSocial
category in the palette by adding URL references to the OpenSocial category in the catalog_default.xml file on the server. This topic describes the required steps for add the gadgets.
Before you begin
When the catalog is available, the following steps are not needed because the gadgets are already available in the palette and do not require any additional configuration.
About this task
When adding OpenSocial gadgets when the catalog is not installed, gadgets must be referenced by using an external URL. If you are developing your own gadget, you can drop the gadget package in the gadgetsDemo application on the Mashup Center server and reference it from there.
The following steps describe how to add an entry for OpenSocial gadgets in the catalog_default.xml file so that they are available in the palette and can be rendered successfully on mashup pages.
- Stop the Mashup Center server.
- Open the OpenSocial directory website, locate the gadget that you want to add to the palette, and copy the XML URL to your clipboard. For example, the full URL to the OpenSocial To Do gadget is http://www.labpixies.com/campaigns/todo/todo.xml.
- Before you add the gadget to the palette, test the gadget to make sure it renders correctly in the default Shindig container that is provided with Mashup Center. To test the gadget, go to the following URL in your browser: http://your_host_name:port/shindig/gadgets/ifr?url=gadget_definition_xml_url, where your_host_name:port is the name of your host server and port and gadget_definition_xml_url is the URL of the OpenSocial gadget. For example, if you want to test the OpenSocial Weather gadget, your test URL might look something like this: http://yourcompany.com:9080/shindig/gadgets/ifr?url=http://myweather.googlecode.com/svn/trunk/weather.xml.
If the gadget renders correctly in your browser, then you can assume that it will render correctly in Mashup Center and can proceed to the next step. If the gadget does not render correctly, check the URL again or try a different gadget. Also, see Troubleshooting OpenSocial gadgets
for more information.
The URLs mentioned in this step are non-IBM websites and may not always be trusted or available. IBM claims no responsibility for these websites.
- Open the Mashup_Center_install_root\mm\config\catalog_default.xml file, and locate the OpenSocial section near the bottom of the file. Add a new entry for the gadget that you want to add. For example, to add the OpenSocial Weather gadget, your entry might look similar to this:
<created>Tue, 9 Dec 2008 15:45:02 -0500</created>
<last-modified>Tue, 9 Dec 2008 15:45:02 -0500</last-modified>
Notice how the full URL to the gadget is located in the <definition>
tag. Also, be sure that the widget type that is defined in the <metadata>
tag is either mm_OSGadget
for gadgets or iw_OSGadget
- Save the file.
- Restart the Mashup Center server.
Parent topic: Using OpenSocial gadgets