You can add either a single task or a group of tasks to the Common Tasks page of the Administration Console. To add a task or task group, use an integration point of type org.glassfish.admingui:commonTask. You can add a single task to either the Deployment task group or the Monitoring task group, but not to any other group.
See Adding a Task Group to the Common Tasks Page for information on adding a task group.
In the example console-config.xml file, the following integration-point element adds a task to the Deployment task group:
<integration-point id="sampleCommonTask" parentId="deployment" type="org.glassfish.admingui:commonTask" priority="200" content="sampleCommonTask.jsf" />
This example specifies the following values:
The id value, sampleCommonTask, specifies the integration point ID.
The parentId value, deployment, specifies that the task is to be placed in the Deployment task group.
Specify a value of monitoring to place the task in the Monitoring task group.
The type value, org.glassfish.admingui:commonTask, specifies the integration point type as a common task.
The priority value, 200, specifies the order of the task within the task group.
The content value, sampleCommonTask.jsf, specifies the JavaServer Faces page that displays the task.
A JavaServer Faces page for a task uses the JSFTemplating tag sun:commonTask. This tag provides all the capabilities of the Project Woodstock tag webuijsf:commonTask.
In the example, the sampleCommonTask.jsf file has the following content:
<sun:commonTask text="Sample Application Page" toolTip="Sample Application Page" infoLinkUrl="/com_sun_webui_jsf/help/ helpwindow.jsf?&windowTitle=Help+Window&helpFile=applications.html" onClick="admingui.nav.selectTreeNodeById('form:tree:deployment:ejb'); parent.location='#{facesContext.externalContext.requestContextPath}/sample/ page/testPage.jsf?name=Sample%20Application%20Page'; return false;"> </sun:commonTask>
In the actual file, there are no line breaks in the infoLinkUrl attribute or the parent.location code values.
This file uses the sun:commonTask tag to specify the task. In your own JavaServer Faces pages, specify the attributes of this tag as follows:
The task name that appears on the Common Tasks page.
The text that appears when a user places the mouse cursor over the task name.
The URL for the link that is displayed at the bottom of the task's information panel.
Scripting code that is to be executed when a user clicks the task name. The parent.location value on the next line is part of the onClick code.