Using Oracle Templates and JSP Tags 7-21
7.4.8 Add Buttons and Check Boxes to Tables
In a table that you create using the wl:table tag, you can use buttons by themselves or in conjunction with a column of check boxes or radio buttons.
When used by themselves, buttons can forward to page UI control. For example, in the WebLogic Server Servers table see
Figure 7–2 , users click on a New button to launch
the Create a Server assistant. When used in conjunction with a check box, buttons can process data on behalf of one
or more table rows. For example, if each row in your table represents an instance of a custom MBean that provides monitoring data for your application, you can enable
users to select a check box for one or more rows and click a button that resets the values in the corresponding MBean instances.
The following sections describe adding check boxes and buttons to tables:
■
Section 7.4.8.1, Add Buttons to a Table
■
Section 7.4.8.2, Add Check Boxes and Buttons to a Table
■
Section 7.4.8.3, Example: How Check Boxes and Buttons Process Data
7.4.8.1 Add Buttons to a Table
To add buttons to a table:
1.
In the table JSP, add the following attributes to the wl-extension:table tag: singlechange=false
controlsenabled=true The controlsenabled attribute enables the table to display buttons. The
singlechange attribute enables users to click the button without having to lock
the domains configuration. See WebLogic Server JSP Tags Reference.
2.
Immediately after the wl-extension:table opening tag, add the following tags:
wl:button-bar wl:button-bar-button labelid=button-label
pageLabel=page-definitionLabel wl:button-bar
where:
■
button-label is the text that you want to display on the button or the name
of a property that you have defined in the bundle that has been declared in the JSPs fmt:setBundle element.
■
page-definitionLabel is the unique label of the page that contains the
instance of the portlet to which you want to forward. The label is defined in the definitionLabel attribute of the netuix:page
element, which is in the pages .book file. For example, to link to the Servers table page:
wl:button-bar wl:button-bar-button
labelid=Servers pageLabel=ServerTableBook
7-22 Oracle Fusion Middleware Extending the Administration Console for Oracle WebLogic Server
wl:button-bar
7.4.8.2 Add Check Boxes and Buttons to a Table