Skip navigation.

Extending the Administration Console

  Previous Next vertical dots separating previous/next from contents/index/pdf Contents View as PDF   Get Adobe Reader

Rebranding the Administration Console

This section describes how to create a WebLogic Portal Look and Feel and deploy it as an Administration Console extension. The extension enables you to replace some or all of BEA's logos, colors, and styles in the Administration Console.

Figure 3-1 illustrates the process. The steps in the process, and the results of each are described in Table 3-1. Subsequent sections detail each step in the process.

Figure 3-1 Administration Console Extension Development Overview

Administration Console Extension Development Overview


 

Table 3-1 Model MBean Development Tasks and Results

Step

Description

Result

1. Copy and Modify the Sample Look and Feel: Main Steps.

BEA installs a sample Look and Feel that you use as a starting point. Replace the images and styles in this sample with your own.

A Look and Feel that contains your logos and styles.

2. (Optional) Create a Message Bundle.

If you want to change the text messages displayed in the banner, login, and login error pages, create your own message bundle and modify the pages to use messages from your bundle.

Localized properties files that contain your messages.

3.Modify the Sample NetUI Extension File.

The NetUI Extension file is the deployment descriptor for your extension. It describes the locations of files and directories in your Look and Feel.

A deployment descriptor for your extension.

4. Archive and Deploy the Extension.

Archive the Look and Feel extension in a JAR file and copy it to your domain's console-ext directory.

When the Administration Console starts in your domain, it uses the Look and Feel extension that is in the domain's console-ext directory instead of the Look and Feel that BEA packages and installs.

 


Copy and Modify the Sample Look and Feel: Main Steps

To create a simple extension that replaces the BEA logos and colors with your own:

  1. Copy all files from the following directory into your own development directory:
  2. WL_HOME/samples/server/medrec/console-extension

    where WL_HOME is the directory in which you installed WebLogic Server.

  3. Change the name of the medrec directory under dev-dir/framework/skins and dev-dir/framework/skeletons to a name that you choose.
  4. where dev-dir is the name of your development directory.

Making more 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, see the Portal User Interface Framework Guide.

Modify the Administration Console Banner

To overwrite the MedRec Look and Feel's image files with your company's image files:

  1. To replace the logo in the Administration Console banner, save your own logo file as dev-dir/framework/skins/medrec/images/banner_logo.gif.
  2. To prevent the need to resize the banner frame, do not make your image any taller than 42 pixels.

  3. To replace the ALT text for the logo, open dev-dir/framework/skeletons/medrec/header.jsp and replace Your Message Here - <bean:message key="login.wlsident"> with your text.
  4. If you want to provide localized strings, use the JSTL <fmt:message> tag. See Create a Message Bundle.

  5. To change the background color of the banner, replace the following image file with one of the same size but that contains a different color: dev-dir/framework/skins/medrec/images/banner_bg.gif

To make more complex modifications, you can change the JSP and styles that render the banner. The dev-dir/framework/skeletons/medrec/header.jsp file determines the contents of the Administration Console banner. Within header.jsp, the style bea-portal-body-header-logo specifies the name and location of the logo file. The style bea-portal-body-header specifies the name and location of an image file that is used as the banner background. Both of these styles are defined in dev-dir/framework/skins/medrec/css/body.css.

Modify Colors, Fonts, Buttons, and Images

The Administration Console uses several cascading style sheets (CSS) to specify its fonts and colors. To change these styles, open the style sheet and change the style's definition. Table 3-2 summarizes the CSS files that the Administration Console uses. All of these files are located in the dev-dir/framework/skins/medrec/css directory.

Table 3-2 CSS Files That Define General Colors and Fonts

CSS File

Description

wls.css

Contains WebLogic Server styles for the following areas:

  • General definitions for elements such as body, a, h1, and h2

  • Data tables

  • Form fields

  • WebLogic Server form buttons

  • Error messages

  • Toolbar content

  • Breadcrumbs content

  • General styles for How Do I..., System Status, and Change Center portlets

  • body.css

  • book.css

  • button.css

  • form.css

  • layout.css

  • portlet.css

  • window.css

Contain WebLogic Portal framework styles for the following areas (some of which are not used by the Administration Console):

  • Portal header and footer

  • Book, page, and menu styles

  • Button styles

  • Form, input, and text area styles

  • Layout and placeholder styles

  • Portlet styles


 

The buttons in the Administration Console use a repeating background image to render the blue fade (and grey for inactive buttons). The image files for these buttons are located in the following directory:
dev-dir/framework/skins/medrec/images

Modify Themes for the Change Center and Other Portlets

Several portlets in the Administration Console use a theme, and you can change the definitions of these themes. Themes are similar to Look and Feels but the scope of a theme is limited to a section of a portal, such as a book, page, or portlet. A theme can be used to change the look and feel of the components of a portal without affecting the portal itself.

For example, the Change Center portlet uses its own theme to distinguish its buttons from the other form buttons in the Administration Console.

To change the color of a theme's buttons or title bars, change the images and styles in the theme's skins directory. Table 3-2 summarizes the directories that contain CSS files and images for theme skins. All of these directories are under the dev-dir/framework/skins/medrec directory. For information about modifying skin themes, see Creating Skins and Skin Themes in WebLogic Workshop Online Help.

Table 3-3 Skins for Administration Console Themes

Skin Directory

Description

wlsbreadcrumbs

Defines fonts and spacing for the breadcrumbs portlet, which displays above the tabbed interface and provides a navigation history.

wlschangemgmt

Defines buttons, fonts, title bar background, and spacing for the Change Center portlet.

wlsmessages

Defines buttons, fonts, title bar background, and spacing for the messages portlet, which displays only when the Administration Console has validation or confirmation messages.

wlsnavtree

Defines buttons, fonts, title bar background, and spacing for the NavTreePortlet.

wlsquicklinks

Defines buttons, fonts, title bar background, and spacing for the How Do I... portlet.

wlsstatus

Defines buttons, fonts, title bar background, and spacing for the System Status portlet.

wlstoolbar

Defines fonts and spacing for the breadcrumbs portlet, which displays in the banner and contains the Home, Help, and AskBEA buttons.

wlsworkspace

Defines borders, spacing, and background colors of the books and pages in the ContentBook area of the Administration Console.


 

Each theme is made up of a skin and a skeleton. The skeleton defines the overall structure of the portlet contents. The definition for each theme's skeleton is under the dev-dir/framework/skeletons/medrec directory. For information about modifying skeleton themes, see Creating Skeletons and Skeleton Themes in WebLogic Workshop Online Help.

Modify the Login and Error Page

The login page asks users to enter a user ID and password. The login error page displays if users enter invalid data. Both of these pages are displayed before the Administration Console loads its portal desktop. Therefore, these pages do not use the portal's Look and Feel and their image and stylesheet files are not under the dev-dir/framework directory. Table 3-4 summarizes the files and directories that determine the appearance of the login and login error pages.

Table 3-4 Files for the Login and Login Error Page Appearance

File

Description

dev-dir/common/
login.css

Defines fonts and spacing for the login page.

dev-dir/images/
login_banner_bg.gif
login_banner_right.gif
login_banner.gif
login_bottom.gif

Images for the login page.

dev-dir/login/
LoginError.jsp
LoginForm.jsp

Render the login and login error pages.

If you want to change the text that these pages display, modify the <fmt:message/> JSP tags to point to messages in your own message bundle. See Create a Message Bundle.


 

 


Create a Message Bundle

In the banner, login, and login error pages, the Administration Console uses JSTL tags to load text messages from localized properties files. For example, to display the window title in LoginForm.jsp:

  1. The <fmt:setBundle basename="global" var="current_bundle" scope="page"/> tag in LoginForm.jsp sets the current message bundle to global.
  2. This JSP tag looks in WEB-INF/classes for files with the following name pattern:
    bundle[-locale].properties.

    The default properties file for this bundle is WEB-INF/classes/global.properties. If the Web browser or operating system specifies a different locale, then the JSP tag would load WEB-INF/classes/global_locale.properties.

  3. The <fmt:message key="window.title" bundle="${current_bundle}" /> tag opens the global.properties file and renders the text that is identified by the window.title key:
    window.title=BEA WebLogic Server Administration Console

If you want to change these messages, you can create your own properties files and modify the JSP tags to use your bundle.

Table 3-5 describes the text messages that the banner, login, and login error pages display.

Table 3-5 Messages in Banner, Login, and Login Error Pages

File

Message Key and Value

dev-dir/login/
LoginForm.jsp

window.title=BEA WebLogic Server Administration Console

login.wlsident=BEA WebLogic Server Administration Console

login.welcome2=Log in to work with the WebLogic Server domain

login.username=Username:

login.password=Password:

login.submit=Log In

dev-dir/login/
LoginError.jsp

window.title=BEA WebLogic Server Administration Console

login.wlsident=BEA WebLogic Server Administration Console

loginerror.authdenied=Authentication Denied

loginerror.passwordrefused=The username or password has been refused by WebLogic Server. Please try again.

login.username=Username:

login.password=Password:

login.submit=Log In

dev-dir/framework/
skeleton/medrec/
header.jsp

window.title=BEA WebLogic Server Administration Console


 

To provide your own messages for the banner, login, and login error pages:

  1. Change the name of the message bundle in the login and login error pages:
    1. Open the files listed in Table 3-5.
    2. In the <fmt:setBundle basename="global" var="current_bundle" scope="page"/> tag, change the value of the basename attribute.
    3. BEA recommends that you include your company name in the bundle name. For example:
      <fmt:setBundle basename="mycompany" var="current_bundle" scope="page"/>

  2. Create the following directory:
    dev-dir/WEB-INF/classes
  3. In this directory, create a text file named bundle.properties
  4. where bundle is the bundle name that you specified in the previous step. For example, mycompany.properties.

  5. Copy and paste into your properties file the message keys and values from Table 3-5. Delete any duplicate key/value pairs.
  6. Modify the values in your properties file.
  7. To create localized properties, save your properties file under the following name:
    bundle[_locale].properties
  8. where locale is a locale code supported by java.util.Locale. See Locale in the J2SE API Specification.

    For example, mycompany_ja.properties.

 


Modify the Sample NetUI Extension File

A NetUI Extension file is the deployment descriptor for your Look and Feel. It contains the names and locations of the files in your Look and Feel, and it causes the Administration Console to replace its Look and Feel with yours. For more information, see the NetUI Extensions Schema Reference.

The sample file is in the following location:
dev-dir/WEB-INF/netuix-extension.xml

To modify this file:

  1. Open the file in a validating XML editor (recommended) or a text editor.
  2. In the <provider-info> element, change the information to describe your Look and Feel, developer contact and support URL.
  3. The information in this element has no programmatic significance. It is intended to help your technical support team keep track of your software modifications.

  4. In the <look-and-feel-content> element:
    1. In the title, skin, and skeleton attributes, replace the medrec value with the name of the directory you chose in step 2 in Copy and Modify the Sample Look and Feel: Main Steps.
    2. In the definitionLabel and markupName attributes, replace the medrec value with the name of the directory you chose in step 2 or use some other string. These attributes are required by the portal framework, but are not used in a Look and Feel extension.

 


Archive and Deploy the Extension

If you are creating additional extensions for the Administration Console, all extensions must be archived in a single JAR file.

To archive and deploy your extensions:

  1. Archive your development directory into a JAR file. The name of the JAR file has no programmatic significance, so choose a name that is descriptive for your purposes.
  2. The contents of your dev-dir directory must be the root of the archive; the dev-dir directory name itself must not be in the archive. If you use the Java jar command to create the archive, enter the command from the dev-dir directory. For example:
    c:\dev-dir\> jar -cf my-extension.jar *

  3. Copy the JAR file into each domain's domain-dir/console-ext directory, where domain-dir is the domain's root directory.
  4. Restart the Administration Server for each domain.

 

Skip navigation bar  Back to Top Previous Next