apex:tab

A single tab in an <apex:tabPanel>.

The <apex:tab> component must be a child of a <apex:tabPanel>.

This component supports HTML pass-through attributes using the “html-” prefix. Pass-through attributes are attached to the generated <td> tag that wraps the tab’s contents.

Example 

1<!-- Page: -->
2<apex:page id="thePage">
3    <apex:tabPanel switchType="client" selectedTab="name2" id="theTabPanel">
4    <apex:tab label="One" name="name1" id="tabOne">content for tab one</apex:tab>
5    <apex:tab label="Two" name="name2" id="tabTwo">content for tab two</apex:tab>
6    </apex:tabPanel>
7</apex:page>

Attributes 

Attribute NameAttribute TypeDescriptionRequired?API VersionAccess
disabledBooleanA Boolean value that specifies whether the tab can be selected and viewed. If set to true, the tab cannot be selected. If not specified, this value defaults to false. 10.0global
focusStringThe ID of the child component in focus when the tab content is displayed. 10.0global
idStringAn identifier that allows the tab component to be referenced by other components in the page. 10.0global
immediateBooleanA Boolean value that specifies whether the action associated with this component happens immediately, without processing any validation rules associated with the fields on the page. If set to true, the action happens immediately and validation rules are skipped. If not specified, this value defaults to false. See Use the immediate Attribute Carefully. 11.0global
labelStringThe text to display in the tab header. 10.0global
labelWidthStringThe length of the tab header, in pixels. If not specified, this value defaults to the width of label text. 10.0global
nameObjectThe name of the tab. Use the value of this attribute to specify the default selected tab for the tabPanel. 10.0global
onclickStringThe JavaScript invoked if the onclick event occurs–that is, if the user clicks the tab. 10.0global
oncompleteStringThe JavaScript invoked if the oncomplete event occurs–that is, when the tab has been selected and its content rendered on the page. 10.0global
ondblclickStringThe JavaScript invoked if the onclick event occurs–that is, if the user clicks the tab twice. 10.0global
onkeydownStringThe JavaScript invoked if the onkeydown event occurs–that is, if the user presses a keyboard key. 10.0global
onkeypressStringThe JavaScript invoked if the onkeypress event occurs–that is, if the user presses or holds down a keyboard key. 10.0global
onkeyupStringThe JavaScript invoked if the onkeyup event occurs–that is, if the user releases a keyboard key. 10.0global
onmousedownStringThe JavaScript invoked if the onmousedown event occurs–that is, if the user clicks a mouse button. 10.0global
onmousemoveStringThe JavaScript invoked if the onmousemove event occurs–that is, if the user moves the mouse pointer. 10.0global
onmouseoutStringThe JavaScript invoked if the onmouseout event occurs–that is, if the user moves the mouse pointer away from the tab. 10.0global
onmouseoverStringThe JavaScript invoked if the onmouseover event occurs–that is, if the user moves the mouse pointer over the tab. 10.0global
onmouseupStringThe JavaScript invoked if the onmouseup event occurs–that is, if the user releases the mouse button. 10.0global
ontabenterStringThe JavaScript invoked if the ontabenter event occurs–that is, if a tab component becomes in focus. 11.0global
ontableaveStringThe JavaScript invoked if the ontableave event occurs–that is, if a component outside the tab becomes in focus. 11.0global
renderedBooleanA Boolean value that specifies whether the component is rendered on the page. If not specified, this value defaults to true. 10.0global
reRenderObjectThe ID of one or more components to redraw when the result of an AJAX update request returns to the client. This value can be a single id, a comma-separated list of ids, or a merge field expression for a list or collection of ids. This value is also only applicable when the value of the switchType attribute is “ajax”. 10.0global
statusStringThe ID of an associated component that displays the status of an AJAX update request. See the actionStatus component. Note that this value is only applicable when the value of the switchType attribute is set to “ajax”. 10.0global
styleStringThe style used to display all portions of the tab component, used primarily for adding inline CSS styles. 10.0global
styleClassStringThe CSS style class used to display all portions of the tab component, used primarily to designate which CSS styles are applied when using an external CSS stylesheet. 10.0global
switchTypeStringThe implementation method for switching to this tab. Possible values include “client”, “server”, and “ajax”. If not specified, this value defaults to “server”. If specified, this value overrides the switchTab attribute on the tabPanel component. 10.0global
timeoutIntegerThe amount of time (in milliseconds) before an AJAX update request should time out. Note that this value is only applicable when the value of the switchType attribute is set to “ajax”. 10.0global
titleStringThe text to display as a tooltip when the user’s mouse pointer hovers over this component. 10.0global

See Also