Configure Preferences to See UI Control Labels

Setting Up a Development Environment 3-3 If you are extending the Administration Consoles Look and Feel, your root directory will contain additional subdirectories. See Chapter 5, Rebranding the Administration Console.

3.4 Configure Preferences to See UI Control Labels

WebLogic Server provides a configuration option for displaying the labels of the Administration Consoles extension points. You use these labels to specify where you want your extension to display. To display these labels:

1. In the Administration Console toolbar, click Preferences.

2. Select the Extensions tab.

3. Select Show Definition Labels.

4. Click Save. A field is displayed over each labeled control on the page. The field displays the value of the controls definitionLabel, prefixed by Book: or Label: to indicate whether it is a book or a label. See Figure 3–1 . recommended root-dircontrols Oracle recommends that you save all of your extensions portal book files .book below a directory named controls. If your extension contains many books or pages, consider creating subdirectories below controls. If you follow this recommendation, URIs for your books or pages will start with controls. For example, controlsmyBook.book. recommended root-dirportlets Oracle recommends that you save all of your extensions portlet files .portlet below a directory named portlets. If your extension contains many portlets, consider creating subdirectories below portlets. If you follow this recommendation, URIs for your portlets will start with portlets. For example, portletsmyContent.portlet . Table 3–1 Cont. Directory Tree for an Administration Console Extension Directory Description 3-4 Oracle Fusion Middleware Extending the Administration Console for Oracle WebLogic Server Figure 3–1 Control Labels in the Administration Console User Interface 4 Creating a Message Bundle 4-1 4 Creating a Message Bundle Oracle recommends that you define all of the text strings that your Administration Console extension displays in a message bundle. A message bundle is a collection of text files properties files that contain key-value pairs properties. You create one properties file for each language or locale that you want to support. If you name the properties file per a set of file-naming conventions, the Administration Console displays strings from the properties file whose locale matches the Web browsers locale setting. To create a message bundle: 1. Create a text file that contains name-value pairs for each string you want to display. Use the equal sign = as the delimiter between the name and value, and place each property on its own line. For example: myextension.myTab.introduction=This page provides monitoring data for my application. myextension.myTab.TotalServletHits.label=Total hits for my servlet. 2. Save the file as root-dirWEB-INFclassesbundle.properties where ■ root-dir is the root directory of your extension ■ bundle is a unique value do not use global, which is the name of a WebLogic Server bundle. Consider using your company name as the value for bundle. The bundle.properties file is the default file that the Administration Console uses if the Web browser or the JVM have not specified a locale. It is a required file. 3. Save each localized version of the properties file as root-dirWEB-INFclassesbundle_locale.properties . where locale is a locale code supported by java.util.Locale. See Locale in the J2SE API Specification, at shttp:java.sun.comj2se1.5.0docsapijavautilLocale.htm l . For example, mycompany_ja.properties. For information about using message bundles, see Section 5.5, Use a Message Bundle for Your Look and Feel and Section 7.1, Create and Use a Message Bundle in Your JSPs . 4-2 Oracle Fusion Middleware Extending the Administration Console for Oracle WebLogic Server 5 Rebranding the Administration Console 5-1 5 Rebranding the Administration Console This section describes how to create a WebLogic Portal Look and Feel and deploy it as an Administration Console extension. A Look and Feel extension enables you to replace some or all of Oracles logos, colors, and styles in the Administration Console.

5.1 Files Used to Create a Look and Feel