Customizing the Administration Console

     Previous  Next    Open TOC in new window    View as PDF - New Window  Get Adobe Reader - New Window
Content starts here

Re-using Administration Console Portlets in Your Portal

You can re-use portlets from the Administration Console within your portal. Doing this allows you to access portal resources directly from your portal, such as content, user and group information, or campaign settings.

This chapter includes the following topics:

 


Overview of the Administration Console Portlets

The Administration Console is comprised of many portlets. Each portlet can access its resources in different ways. Each tab within the Administration Console is a page containing a portlet, see Figure 2-1 for an illustration.

Figure 2-1 Administration Console Tabs

Administration Console Tabs

To access portal resources without accessing the Administration Console, you can re-use these portlets in your portal application. Portlets associated with the following portal resources are available to add to your portal:

Note: Portal Management, Delegated Administration, Entitlements, and Service Administration portlets cannot be re-used in portal applications.

Portlets within the Administration Console react to tree events. For example, when you use the Content Resource tree to select content, the content Summary tab (the content summary portlet) is activated, see Figure 2-2.

However, within your portal, resource IDs are used in inter-portlet communication events to activate Administration Console portlets. If another portlet refers to the resource ID that is used by a Administration Console portlet, that portlet is activated.

Note: Administration Console tree portlets, such as the Portal Resource tree and the Content Resource tree, cannot be re-used in your portal application. If you want to use the entire Administration Console functionality such as the Content Management Resource tree as well as its portlets, BEA recommends using the Administration Console rather than adding an Administration Console portlet to your portal.
Figure 2-2 Selecting Article in the Repository Tree Calls the Summary Portlet

Selecting Article in the Repository Tree Calls the Summary Portlet

WebLogic Portal provides specific APIs for working with Administration Console portlets that provide an interface-based framework that integrates with inter-portlet communication events. Instead of using events and event handlers explicitly, Administration Console portlets generate and receive events using resource IDS and the interface-based framework.

For example, you can use a combination of the Content Presenter portlet and the Edit Content portlet from the Administration Console to allow users to modify content on the fly. To do so, within the Content Presenter portlet, you add an Edit Content button, which activates the edit content portlet.

 


Adding Administration Console Portlets to Your Portal Application

Before you can add any administration console portlets to your portal, you must first add the respective J2EE libraries to your web project. These library modules provide the common framework and the respective portlets for this purpose.

After ensuring that your web project includes all the library modules you need, you can add administration portlets to your portal.

To be activated, Administration Console portlets require communication from another portlet. Subsequently, you need to build a portlet that activates or calls an Administration Console portlet. Activating an Administration Console portlet is done by using resource IDs. You need to include code in the primary portlet to generate an event using a resource ID that the Administration Console portlet recognizes.

Adding Administration Console Resources to Your Web Project

Administration Console portlets are included in respective library modules that you must add to your web project, as shown in Table 2-1. Copy the J2EE modules that you need. The wlp-tools-common-web-lib and wlp-tools-framework-web-lib libraries are required for all portlets.

To add administration console J2EE libraries:

  1. Right-click your web project folder and select Build Path > Add Libraries.
  2. In the Add Library dialog, select WebLogic J2EE library. Click Next.
  3. Click Add... and browse to the respective library module and click OK.
  4. Click Finish.
  5. Repeat for each of the modules listed in Table 2-1. The added portlets appear in the list of available portlets in the Design Palette.
  6. Table 2-1 J2EE Library Modules for Administration Console Portlets
    Library Module
    Portlets
    Description
    wlp-tools-common-web-lib
    All
    Contains the common framework needed for all administration console portlets.
    wlp-tools-framework-web-lib
    All
    Contains the common framework needed for all administration console portlets.
    wlp-tools-ugm-web-lib
    User Management
    Group Management
    Contains the portlets for user and group management
    wlp-tools-content-web-lib
    Content Management
    Contains all content management portlets.
    wlp-tools-im-web-lib
    Campaigns
    Content Selectors
    Placeholders
    User Segments
    Contains all interaction management portlets.

Using Portlet Resource IDs to Generate Events

Administration Console portlets are designed to react to inter-portlet communication events that are generated by resource IDs. When a portal resource, such as content or a user name, is entered or selected in a portlet, the respective Administration Console portlet is activated.

For example, you can allow portal users to edit the content displayed in a portlet by adding code in that portlet that activates the Edit Content Properties portlet, as shown in Listing 2-1. The following WebLogic APIs are used to interact with or activate Administration Console portlets:

Using Online Help in Reused Portlets

If you are reusing WebLogic Portal Administration Console portlets in a portal, some features and steps that are referred to in the administration console online help system might not apply in the context in which the portlets are reused.

For example, in the context of the administration console, content management portlets react to tree events (events generated by clicking in the content resources tree to select content). In a reuse context, the portlets are configured (by a portlet developer) to react to events fired by other portlets. The tree view will not be present and therefore, some steps described the help system will not apply.

 


Ensuring Resources Appear in Reused Administration Console Portlets

It is possible that some resources, such as certain images, CSS files, and scripts, will not appear in a reused Administration Console portlet. This is because the portlet references resources that are only specified in the skin file that is used by the Portal Administration Console. If your portal uses a different skin file, these resources will not show up, as shown in Figure 2-3.

Figure 2-3 Missing Graphic in Reused Administration Console Portlet

Missing Graphic in Reused Administration Console Portlet

The simplest way to fix this problem is to add the appropriate references to the skin.xml file used by your portal's look and feel. To edit the skin.xml file, you must first copy it to your project in WorkSpace Studio (right-click the file and select Copy to Project). For more information on skins, see Working with Skins in the Portal Development Guide.

Listing 2-2 highlights the kinds of changes you might need to make to your skin file to ensure that Administration Console specific resources show up in your reused portlet. These resources are indicated in Listing 2-2 by the comment:

<!--  from the wlp-tools skin -->
Note: If your portal is using the Bighorn skin, you also need to make similar changes to the Internet Explorer specific skin file, .../skins/bighorn/msie/skin.xml. This ensures that the skin will function properly in Internet Explorer browsers.
Listing 2-2 Adding Administration Console Specific Resources to a Skin File
<skin 
    xmlns="http://www.bea.com/servers/portal/framework/laf/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.bea.com/servers/portal/framework/laf/1.0.0 laf-skin-1_0_0.xsd"
>
<target-skeleton>
<skeleton-id>bighorn</skeleton-id>
</target-skeleton>
<images>
<search-path>
<path-element>images</path-element>

<!-- from the wlp-tools skin -->
<path-element>../wlp-tools/images</path-element>

</search-path>
</images>
<render-dependencies>
<html>
<links>
<search-path>
<!-- from wlp-tools skin -->
<path-element>../wlp-tools/custom/css</path-element>
<path-element>../wlp-tools/css</path-element>


<path-element>css</path-element>
</search-path>
<link href="colors.css" rel="stylesheet" type="text/css" />
<link href="general.css" rel="stylesheet" type="text/css" />
<link href="menu.css" rel="stylesheet" type="text/css" />
<link href="window.css" rel="stylesheet" type="text/css" />
<link href="wsrp.css" rel="stylesheet" type="text/css" />
<link href="custom.css" rel="stylesheet" type="text/css" />

<!-- from wlp-tools skin -->
<link href="wlp.css" type="text/css" rel="stylesheet"/>
<link href="wlp-custom.css" type="text/css" rel="stylesheet"/>
</links>

<!-- from wlp-tools skin -->
<scripts>
<search-path>
<path-element>../wlp-tools/js</path-element>
<path-element>../../../js</path-element>
</search-path>
<script type="text/javascript"                     src="com/bea/portal/tools/js/Core.js"/>
<script type="text/javascript"                     src="com/bea/portal/tools/js/Core.jsp"/>
<script type="text/javascript"                     src="com/bea/portal/tools/js/javascriptConstants.jsp"/>
<script type="text/javascript"                   src="com/bea/portal/tools/js/Math.js"/>
<script type="text/javascript"                   src="com/bea/portal/tools/js/skin/FeatureProviderManager.js"/>
<script type="text/javascript"                   src="com/bea/portal/tools/js/skin/ProgressManager.js"/>
<script type="text/javascript"                   src="com/bea/portal/tools/js/html/Form.js"/>
<script type="text/javascript"                   src="com/bea/portal/tools/js/html/Event.js"/>
<script type="text/javascript" src="progress-manager.js"/>
<script type="text/javascript" src="progress-manager.jsp"/>
<script type="text/javascript" src="main-menu.js"/>
<script type="text/javascript" src="resize-collapse.js"/>
<script type="text/javascript" src="skin.js"/>
</scripts>

<!-- from wlp-tools skin -->

<styles>
<search-path>
<path-element>../wlp-tools/custom/css</path-element>
<path-element>../wlp-tools/css</path-element>
</search-path>
<style content-uri="wlp-ajax-image.css" type="text/css" />
</styles>

</html>
</render-dependencies>

<!-- from wlp-tools skin -->
<script-dependencies>
<script-fragments>
<fragment            event-handler="onload">__BEA.framework.skins['wlp-tools'].js.onload()
           </fragment>
</script-fragments>
</script-dependencies>
</skin>

  Back to Top       Previous  Next