![]() |
![]() |
e-docs > WebLogic Server > Extending the Administration Console > Using the Console Extension Tag Library |
Extending the Administration Console
|
Using the Console Extension Tag Library
The following sections describe the attributes of the console extension tags and provide a sample usage for each:
Overview of the Console Extension JSP Tag Library
A JSP tag library is supplied with the WebLogic Server distribution for use in creating console extensions. The tag library allows you to:
Tag Library Attribute Reference
The following sections describe the usage of each tag in the Console Extension Tag Library.
Use the <wl:node> tag to create new nodes in the Administration Console navigation tree.
The following example demonstrates the usage of the <wl:node> tag:
Listing 2-1 Sample Usage of the <wl:node> Tag
<wl:node
label='<%="My Console Extension"%>'
icon='/images/smiley.gif'
expanded='true'>
<wl:node
label='My 1st nested node'
icon='/images/bullet.gif'
url='/dialog_domain_example.jsp'>
</wl:node>
<wl:node label='My 2nd nested node'
icon='/images/bullet.gif'>
</wl:node>
</wl:node>
Table 2-1 Attributes of the <wl:node> Tag
<wl:menu> and <wl:menu-separator> Tags
Use the <wl:menu> to create menus and actions that users access by right-clicking on nodes in the navigation tree defined with the <wl:node> tag. The <wl:menu-separator> tab inserts a separator line in the right-click menu.
Listing 2-2 Usage of the <wl:menu> and <wl:menu-separator> Tags
...
<wl:node
label='My 2nd nested node'
icon='/images/bullet.gif'>
<wl:menu
label='BEA Product Documentation'
url='http://www.oracle.com/technology/documentation/index.html'
target='_blank'/>
<wl:menu-separator/>
<wl:menu
label='BEA home page'
url='http://www.bea.com'
target='_blank'/>
</wl:node>
...
The above code creates a right-click menu under the "My 2nd Nested Node" entry in the navigation tree.
Table 2-2 Attributes of the <wl:menu> Tag
The <wl:menu-separator> tag has no attributes.
Use the <wl:tab> tag to create a tabbed interface in your console extension. You can create nested tabbed screens by nesting a <wl:tab> tag within another <wl:tab> tag. Only one level of nesting is supported.
The following example demonstrates the usage of the <wl:tab> tag:
Listing 2-3 Sample Usage for the <wl:tab> Tag
<wl:tab name='TopLevelTabA' label='Top Level Tab A'>
<wl:tab name='NestedTabA1' label='Nested Tab A-1'>
(Insert your JSP and/or HTML code
for displaying your console extension here.)
</wl:tab>
<wl:tab name='NestedTabA2' label='Nested Tab A-2'>
(Insert your JSP and/or HTML code
for displaying your console extension here.)
</wl:tab>
</wl:tab>
<wl:tab name='TopLevelTabB' label='Top Level Tab B'>
<wl:tab name='NestedTabB1' label='Nested Tab B-1'>
(Insert your JSP and/or HTML code
for displaying your console extension here.)
</wl:tab>
<wl:tab name='NestedTabB2' label='Nested Tab B-2'>
(Insert your JSP and/or HTML code
for displaying your console extension here.)
</wl:tab>
</wl:tab>
Table 2-3 Attributes of the <wl:tab> Tag
The <wl:dialog> Tag demarcates a section of the JSP that defines tabbed console screens. <wl:tab> tags must appear with in a <wl:dialog> block.
Listing 2-4 Sample Usage of the <wl:dialog> Tab
...
<wl:dialog>
<wl:tab>
....(Insert code for tabbed dialog screen here.)
</wl:tab>
</wl:dialog>
...
The <wl:dialog> tag has no attributes.
Insert the <wl:stylesheet> tag with the HTML <head> block to specify that your console screens use the same display styles (fonts, colors, etc.) as the standard Administration Console.
Listing 2-5 Sample Usage of the <wl:stylesheet> Tab
<html>
<head>
<wl:stylesheet/>
</head>
...
The <wl:dialog> tag has no attributes.
The <wl:extensibility-key> tag creates a scripting variable that represents a Java object. You can use this tag in the JSP that defines the Navigation tree.
Note: The <wl:extensibility-key> tag cannot be used in a JSP that defines a console dialog screen.
Listing 2-6 Sample Usage of the <wl:extensibility-key> Tag
<wl:extensibility-key
id='domainKey' class='weblogic.management.configuration.DomainMBean' />
<%="Configuration Version is" + domainKey.getConfigurationVersion()%>
Use the <wl:text> tag to display text from the localization catalog.
Listing 2-7 Sample Usage of the <wl:text> Tag
<wl:text textId='Text.3' textParamId='Param.1' />
<p>
<wl:text textId='Text.2' textParam="Blue"/>
Table 2-4 Attributes of the <wl:text> Tag
Using the Tag Library in a Console Extension
To use the console extensibility tag library:
<taglib>
<taglib-uri>console_extension_taglib.jar</taglib-uri>
<taglib-location>
WEB-INF/console_extension_taglib.tld
</taglib-location>
</taglib>
<%@ taglib uri='console_extension_taglib.jar' prefix='wl' %>
![]() |
![]() |
![]() |
![]() |
||
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |