Oracle GlassFish Server 3.0.1 Add-On Component Development Guide

Adding Content to a Page

You can add content for your add-on component to an existing top-level page, such as the Configuration page or the Resources page. To add content to one of these pages, use an integration point of type org.glassfish.admingui:configuration or org.glassfish.admingui:resources.

Example 3–11 Example Resources Page Implementation Point

In the example console-config.xml file, the following integration-point element adds new content to the top-level Resources page:


This example specifies the following values:

Another integration-point element in the console-config.xml file places similar content on the Configuration page.

Creating a JavaServer Faces Page for Your Page Content

A JavaServer Faces page for page content often uses the tag sun:property to specify a property on a property sheet. This tag provides all the capabilities of the Project Woodstock tag webuijsf:property.

Example 3–12 Example JavaServer Faces Page for a Resource Page Item

In the example, the sampleResourceLink.jsf file has the following content:

        toolTip="Sample Resource" 
        url="/sample/page/testPage.jsf?name=Sample%20Resource%20Page" >
        <sun:image url="/resource/sample/images/sample.png" />
        <sun:staticText text="Sample Resource" />

        url="/sample/page/testPage.jsf?name=Another" >
        <sun:image url="/resource/sample/images/sample.png" />
        <sun:staticText text="Another" />

The file specifies two simple properties on the property sheet, one above the other. Each consists of a sun:hyperlink element (a link to a URL). Within each sun:hyperlink element is nested a sun:image element, specifying an image, and a sun:staticText element, specifying the text to be placed next to the image.

Each sun:hyperlink element uses a toolTip attribute and a url attribute. Each url attribute references the testPage.jsf file that is used elsewhere in the example, specifying different content for the name parameter.

You can use many other kinds of user interface elements within a sun:property element.