You see the Properties window for a Tab component when you select a tab node under a tab set node in the
If you select a tab in the Visual Designer, a side effect is that it becomes the selected tab. If this effect is not what you want, select the tab in the Navigator window so you can set its properties.
This JavaServer Faces 1.2 component has the following properties.
General
id.Type: String
The name of the Tab component in the page bean and the JSP file.
Appearance
style. Type: String
Cascading Style Sheet rules (CSS level 2) to be applied to the component. For example:
position: absolute; left: 288px; top: 312px
You can enter values directly or click the ellipsis (...) button to use the Style Editor.
This property overrides any settings in the theme or the project CSS file for this component. If a style specified in this property does not appear to take effect, it is because an area of the component is obscured by a child component that has different style settings.
For a list of CSS2 style attributes, see the web page at
styleClass. Type: String A space-separated list of CSS2 style classes to be applied when the component is rendered. The style classes must be defined in the project's style sheet or in the theme's CSS file. If you click the ellipsis button (...), you see a list of all styles you can add to this property. For information on adding CSS classes and rules to the project's cascading style sheet, see CSS Editor.
See the note above under the style property description for an explanation of why a class added to this property might appear to have no effect on the component.
If you add a CSS style class from the current theme to your project CSS file and you redefine the style class, the change affects all components that use this style class. However, you can add your own style classes to the project CSS file that redefine the default style classes, and then when you add them to this property, the changes affect only this instance of this component.
text. Type: String
The label on the tab.
Data
selectedChildId. Type: String
If this tab has child tabs, or subtabs, this property indicates the ID of the subtab that is selected. If there are no subtabs, the value of this property is null. You can set the property by choosing an ID from the drop down list to the right of the property.
Events
action. The application action to invoke when this component is activated by the user.
The JSP tag for this property is actionExpression.
If you right-click the component, you can choose Edit action Event Handler to define an action method for the tab. The expression must evaluate to a either a String or a public method that takes no parameters and returns a String. If you set the action property, the page is submitted.
Behavior
disabled. Type: boolean
If selected, indicates that this component should never receive focus or be included in a submit.
target. Type: String
This property is typically not used in a web application developed in the IDE because frames are not supported in the Visual Designer. The property indicates the frame of the current page in which the link is to be opened. If a frame with this name does not exist, the response is rendered in a new window unless overridden by the user. The following frame names have special meaning:
_blank - renders the response in a new, unnamed window
_self - renders the response in the current frame
_parent - renders the response in the immediate frameset parent
_top - renders the response in the full, unframed window
toolTip. Type: String
Rendered as the HTML title attribute of the component, which is readable by a screen reader and can be displayed as a tool tip.
If the component is disabled, the tooltip will not display in most browsers.
url. Type: String
This property is not often used in a web application developed in the IDE because its typical use case is with a frame, and frames are not supported in the Visual Designer. Also, if the tab has a Layout Panel, this property cannot be used. The property's value is the URL of a target document or resource.
visible. Type: boolean
Indicates whether or not the component can be seen by the user on the rendered HTML page. This property is selected by default. If you deselect this property, the component's HTML code is rendered on the page, but the component is not visible in the browser because it is hidden by a style setting. Because the HTML code is rendered, the component can still be processed on form submissions, and users who view source in the browser can see the HTML code. In addition, your web application can use client-side JavaScript to show or hide the component.
If you need to completely hide the component, for example, because it contains sensitive information that certain users should not see, deselect the rendered property.
Accessibility
tabIndex. Type: String
Optionally specifies the position of the component in the tab order of the document. Determines when the component will get focus if the user tabs through the document. The value must be an integer between 0 and 32767.
JavaScript
onBlur. Type: String
JavaScript to be executed when the component loses focus.
onClick. Type: String
JavaScript to be executed when the user clicks the component.
onFocus. Type: String
JavaScript to be executed when the component gains focus.
onKeyDown. Type: String
JavaScript to be executed when the component has focus and a key is pressed.
onKeyPress. Type: String
JavaScript to be executed when the component has focus and a key is pressed and released.
onKeyUp. Type: String
JavaScript to be executed when the component has focus and a key is released.
onMouseDown. Type: String
JavaScript to be executed when the mouse cursor is over the component and the user presses down on the mouse button.
onMouseMove. Type: String
JavaScript to be executed when the user moves the mouse cursor within the component.
onMouseOut. Type: String
JavaScript to be executed when the user moves the mouse cursor away from the component after it has been over the component.
onMouseOver. Type: String
JavaScript to be executed when the user moves the mouse cursor onto the component.
onMouseUp. Type: String
JavaScript to be executed when the mouse cursor is over the component and the user releases the mouse button.
Advanced
actionListenerExpression. Type: MethodExpression
A method expression representing an action listener method that is notified when this component is activated by the user. The value must be a valid JSF method expression, such as #{Page1.action_method}, and it must evaluate to the name of a public method that takes an ActionEvent parameter with a return type of void.
immediate. Type: boolean
This property affects how the tab behaves when it contains input components that have validators. See the note at the end of Tab Set Component, which describes the interactions between setting this property for a tab and the tab set. In general, as for other components, if this property is selected, when the user activates the component, the code in the page bean is executed before the validation, updating of model values, and so on. Essentially, code execution happens right away on the server, which then returns the page.
rendered. Type: boolean
If selected, the tab is to be rendered and processed on any subsequent page submission. If not selected, the tab does not appear on the page at all, not even as a hidden component.
type. Type: String
The content type of the resource to which this tab links. Equivalent to the HTML attribute type, which is a MIME type, such as text/html, image/png, image/gif, video/mpeg, text/css, or audio/basic.
urlLang. Type: String
Code describing the language used in the resource referred to by the url property. Equivalent to the hreflang attribute of the HTML <a> tag. To choose a language code, you can click the ellipsis button (...) to open the property editor. Some examples:
ar - Traditional Arabic
de - German
en - English
es - Spanish
fr - French
ja - Japanese
In addition to the codes available in the property editor, you can also enter additional codes using ISO standard names. Some examples: