apex:panelBarItem

A section of an <apex:panelBar> that can expand or retract when a user clicks the section header. When expanded, the header and the content of the <apex:panelBarItem> is displayed. When retracted, only the header of the <apex:panelBarItem> displays.

This component supports HTML pass-through attributes using the “html-” prefix. Pass-through attributes are attached to the generated container <div> tag.

Example 

1<!-- Page: panelBar --> 
2
3<!-- Click on Item 1, Item 2, or Item 3 to display the content of the panel -->
4
5<apex:page>
6    <apex:panelBar>
7        <apex:panelBarItem label="Item 1">data 1</apex:panelBarItem>
8        <apex:panelBarItem label="Item 2">data 2</apex:panelBarItem>
9        <apex:panelBarItem label="Item 3">data 3</apex:panelBarItem>
10    </apex:panelBar>
11</apex:page>
12
13<!-- Page: panelBarItemEvents -->
14
15<apex:page >
16  <apex:pageMessages/>
17  
18  <apex:panelBar>
19    <apex:panelBarItem 
20          label="Item One" 
21          onenter="alert('Entering item one');" 
22          onleave="alert('Leaving item one');">
23
24      Item one content
25
26    </apex:panelBarItem>
27
28    <apex:panelBarItem 
29          label="Item Two" 
30          onenter="alert('Entering item two');" 
31          onleave="alert('Leaving item two');">
32
33      Item two content
34
35    </apex:panelBarItem>
36  </apex:panelBar>
37
38</apex:page>

Attributes 

Attribute NameAttribute TypeDescriptionRequired?API VersionAccess
contentClassStringThe style class used to display the content of the panelBarItem component, used primarily to designate which CSS styles are applied when using an external CSS stylesheet. 10.0global
contentStyleStringThe style used to display the content of the panelBarItem component, used primarily for adding inline CSS styles. 10.0global
expandedStringA Boolean value that specifies whether the content of this panelBarItem is displayed. 10.0global
headerClassStringThe style class used to display the header of the panelBarItem component, used primarily to designate which CSS styles are applied when using an external CSS stylesheet. 10.0global
headerClassActiveStringThe style class used to display the header of the panelBarItem component when the content of the panelBarItem is displayed, used primarily to designate which CSS styles are applied when using an external CSS stylesheet. 10.0global
headerStyleStringThe style used to display the header of the panelBarItem component, used primarily for adding inline CSS styles. 10.0global
headerStyleActiveStringThe style used to display the header of the panelBarItem component when the content of the panelBarItem is displayed, used primarily for adding inline CSS styles. 10.0global
idStringAn identifier that allows the panelBarItem to be referenced by other components in the page. 10.0global
labelStringThe text displayed as the header of the panelBarItem component. 10.0global
nameObjectThe name of the panelBarItem. Use the value of this attribute to specify the default expanded panelItem for the panelBar. 11.0global
onenterStringThe JavaScript invoked when the panelBarItem is not selected and the user clicks on the component to select it. 16.0
onleaveStringThe JavaScript invoked when the user selects a different panelBarItem. 16.0
renderedBooleanA Boolean value that specifies whether the component is rendered on the page. If not specified, this value defaults to true. 10.0global

See Also