Sun GlassFish Web Space Server 10.0 Administration Guide

Using the Widget Consumer Portlet

You can embed a web widget by copying a JavaScriptTM or flash code snippet and pasting it in the text box after clicking the Configuration button on the Widget Consumer portlet. On saving the changes to the configuration, you will be able to view the web widget from the portlet.

Widget Consumer portlet is an instanceable portlet. You can add any number of instances of the portlet to your page with each portlet instance embedding a separate widget. For example, YouTube links provide a code snippet named Embed at the right top corner. You can copy and paste this code to the Widget Consumer portlet to view the YouTube link.

ProcedureTo Configure the Widget Consumer Portlet

This procedure describes how to copy the code snippet for a web widget from the web site cricinfo.com and use it on the Widget Consumer portlet.

  1. Log in to Sun GlassFish Web Space Server as the admin user.

  2. Choose Add Application from the Welcome menu and add the Widget Consumer portlet to your page.

  3. Copy the code snippet to embed a web widget.

    In this example, copy the code snippet to embed a web widget from the site cricinfo.com.

    Figure 4–14 Copying the Code Snippet to Embed a Widget

    Copying the Code Snippet to Embed a Widget

  4. Click the Configuration button on the portlet.

  5. Paste the widget code into the text box.

  6. Click Save.

    You can view the widget from the Widget Consumer portlet.