Extending the Administration Console
Administration Console extensions enable you to add content to the WebLogic Server Administration Console, replace content, and change the logos, styles and colors without modifying the files that are installed with WebLogic Server. For example, you can add a portlet that provides custom monitoring and management facilities for your applications.
The Administration Console is a J2EE Web application that uses the WebLogic Portal framework, Apache Beehive, Apache Struts, Java Server Pages (JSP), and other standard technologies to render its user interface (UI) and content. It also uses the WebLogic Portal framework to enable extensions.
An Administration Console extension is a JAR file that contains the resources for a section of a WebLogic Portal Web application. When you deploy the extension, the Administration Console creates a union of the files and directories in its WAR file with the files and directories in the extension JAR file. Once the extension has been deployed, it is a full member of the Administration Console: it is secured by the WebLogic Server security realm, it can navigate to other sections of the Administration Console, and if the extension modifies WebLogic Server resources, it participates in the change control process.
The WebLogic Portal framework provides basic support for rendering the UI. The full WebLogic Portal product provides the framework and additional features such as personalization, interaction management, content management, and the ability for end users to customize their portal desktops.
If your BEA product license includes only WebLogic Server, then you can use the WebLogic Portal framework when creating Administration Console extensions. If you want your own Web applications to provide a portal interface, you can purchase the WebLogic Portal product.
The UI for the Administration Console is rendered by groups of specialized WebLogic Portal components called UI controls. For example, one group of UI controls renders the two-column layout that you see after you log in to the Administration Console. Other groups render individual tabs in the tabbed interface.
Many of these UI controls are identified by unique labels, and your NetUI Extension XML file specifies the labeled control that you want to append or replace. You can also use these labels with WebLogic Server JSP tags to forward requests to specific UI controls. If a UI control is not identified by a label, you cannot extend it or forward to it. You must either interact with its labeled ancestor control or a labeled child control.
Most pages in the Administration Console use a single column layout, but one of the top pages uses a two-column layout to create the left column that contains the Change Center, Domain Structure, and other portlets, and the right column that contains the tabbed interface.
Every WebLogic Portal Web application must have at least one desktop control, and the Administration Console supports only one. Its label is
defaultDesktopLabel (see Figure 2-1).
You can use Administration Console extensions to replace the desktop's Look and Feel, but you cannot replace the top-level book. To replace the Look and Feel, use the
desktop-extension element in the netuix-extension XML file (see desktop-extension in the NetUI Extension Schema Reference):
The top-level book in the Administration Console is identified by the label
Home. It contains a single page (labeled
page) within which resides all of the Administration Console content (see Figure 2-2).
page page uses a two-column layout. The left column (layout location 0) contains portlets that provide essential services when using the Administration Console. The right column (layout location 1) contains:
ContentBook. See The ContentBook.
To extend the
page page, use the
page-extension element in the netuix-extension XML file (see page-extension in the NetUI Extension Schema Reference):
ContentBook is a book that contains over 40 pages, but it displays only one page at a time. Navigational controls throughout the Administration Console determine which page is displayed. For example, if a user clicks on "mydomain" in the portlet whose user-visible title is Domain Structure (NavTreePortlet), the
ContentBook displays the page that contains controls for the configuration a domain (see Figure 2-3).
Each page in
ContentBook contains a single content-specific book. This content-specific book contains multiple books, some of which use a singleLevelMenu control to display a tabbed interface. Each of the tabs in Figure 2-3 (Configuration, Monitoring, Control, Security, Web Services Security, and Notes) is rendered by a book that uses the singleLevelMenu control.
Each book that displays a tabbed interface contains at least one page. If the book contains multiple pages, each page uses a singleLevelMenu control to display a subtab. In Figure 2-3, the
DomainconfigTabPage book renders the Configuration tab. Each of the subtabs in this book is a page. For example, the
DomainConfigGeneralPage is the page that contains the portlet that renders the General subtab.
Some content-specific books do not display a tabbed interface. Figure 2-4 shows the
ServerBook, which does not display a tabbed interface.
The simplest extensions within the
ContentBook add a tabbed book to a content-specific book or add a subtab. To extend the
ContentBook, use the
book-extension element in the netuix-extension XML file (see book-extension in the NetUI Extension Schema Reference).
Figure 2-5 shows the top levels of the Administration Console's labeled UI controls. For a complete list of labeled UI controls, including all of the content-specific books, download and install a Look and Feel that causes the Administration Console to display labels for its controls. See Deploy a Development Look and Feel to See UI Control Labels.
A Look and Feel is a collection of images, cascading style sheets, XML files, and other file types that control the physical appearance of a portal application. For example, it defines the fonts and colors used by the Administration Console, the layout of portal components, and the navigation menus.
Creating a simple Look and Feel that contains your company's logos, fonts, and color scheme requires you to copy a sample Look and Feel that WebLogic Server provides and then replace the logos and some cascading style sheet (CSS) definitions. Making complex changes to the WebLogic Server Look and Feel, such as changing the layout of portal components and navigation menus, requires an advanced knowledge of WebLogic Portal Look and Feels. If you have a license for WebLogic Workshop, you can use its Look and Feel editor to make these complex changes. For more information about Look and Feels, see the Portal User Interface Framework Guide.
Note: Because the Administration Console uses only the WebLogic Portal Framework, it supports only a single Look and Feel. Portal applications that use the entire set of features available with a license for the BEA WebLogic Portal product can support multiple Look and Feels that are personalized based on user or group ID.
Most of the content in the Administration Console is rendered by JSPs, and most of these JSPs import one of several template JSPs to provide a basic structure for the content. In addition, the JSPs use several JSP tag libraries to render such UI features as tables, data-entry boxes, and buttons.
Your console extensions can follow this same pattern and use the Administration Console's JSP templates and tag libraries. For example, by using JSP tags and templates, less than 45 lines of code are needed to generate the Server table page in Figure 2-4 (see Listing 2-1).
<wl:column property="name" label="server.table.label.name">
<wl:column property="machineName" label="server.table.label.machine"/>
Table 2-1 describes the JSP templates that you can use for your Administration Console extensions. All of the templates are located in the
/layouts directory, which is relative to the
WEB-INF directory of the Administration Console. WebLogic Server does not publish the templates themselves, but Creating Portlets That Match the Administration Console describes how to use them.
The Administration Console uses this template for all of its JSPs that render a single table (see Figure 2-4).
To create the overall structure of the document, the template outputs an HTML table with two rows. The first row contains everything in the including document's
The second row contains everything in the including document's <beehive-template:section name="table"> tag, which is usually a table that displays a list of WebLogic Server resources and a button bar for working with the resources.
Listing 2-1 uses this template.
The Administration Console uses this template for all of its JSPs that render an introductory description, an HTML form, and Save and Cancel buttons (see Figure 2-3).
If a user has permission, the template outputs an HTML table with four rows. The first and last rows display Save and Cancel buttons along with a message indicating whether the user has a lock on the configuration and can make changes. If a user does not have permission, the table does not contain these rows.
For each of the tag libraries in Table 2-2, the Administration Console provides runtime support by default. If you want development support for these libraries (for example, if you use an integrated development environment that provides code completion for JSP tags), you must configure your development environment to include these tags. (See Set Up Your Development Environment.)
Note: You can create custom tag libraries or use additional tag libraries, but you must include all of the necessary support files for custom tag libraries in your extension JAR file. See Programming WebLogic JSP Tag Extensions.
The documentation for this tag library is in the WebLogic Server 9.0 JSP Tags Reference.
You can download the Beehive distribution, which includes the tag libraries and documentation from http://incubator.apache.org/beehive/downloads.html.
You can download the JSTL distribution from http://java.sun.com/products/jsp/jstl/downloads/index.html.
The documentation for these tag libraries is in the JSTL Tag Library Reference.
You can download the Struts distribution from http://struts.apache.org/download.cgi.
The documentation for these tag libraries is available from http://struts.apache.org/.
If your extension adds books or pages to the Administration Console, the NetUI Extension file names a portal include file (instead of a portlet file) that defines the books or pages. The portal include file names a portlet file to be loaded.