You see the Properties window for a JavaServer Faces Image component when you select the component on a page that you are editing in the Visual Designer.
Most of the Image component's properties are both JSP attributes and properties of the HtmlGraphicImage Java component in the page bean.
This standard JavaServer Faces component has the following properties.
General
id. Type: text
The name of the Image component in the page bean and the JSP file.
Appearance
alt. Type: String
The alternate text for the image. The alt text describes the graphic element in the HTML page, is readable by screen readers, can display as a tool tip, and displays when the user has display of images turned off in the web browser. Same as the HTML attribute alt of the <img> tag.
height. Type: String
Sets the height of the image in pixels if you want to override the actual height of the displayed image. In HTML, this property is the height attribute of the generated <img> tag.
longdesc. Type: String
The URL of a web page that has a description for this graphic. In HTML, this property is the longdesc attribute of the generated <img> tag.
style. Type: String
Cascading Style Sheet rules (CSS level 2) to be applied to the component. This property overrides any settings in the project CSS file. For example:
position: absolute; left: 288px; top: 312px
You can enter values directly or click the ellipsis (...) button to use the Style Editor.
For a list of CSS2 style attributes, see the web page at
styleClass. Type: String
Enter 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. 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.
title. Type: String
Advisory title information about the component that is readable by a screen reader and can be displayed as a tool tip.
If the component is disabled, the tool tip will not display in most browsers.
width. Type: String
Sets the width of the image in pixels if you want to override the actual width of the displayed image. In HTML, this property is the width attribute of the generated <img> tag.
Data
value. Type: Object
The relative path to the image file, such as /resources/image-file.gif, or a URL that points to an image, such as
.
JavaScript
onclick. Type: String
JavaScript to be executed when the user clicks the image.
ondblclick. Type: String
JavaScript to be executed when the user double-clicks the image.
onkeydown. Type: String
JavaScript to be executed when the image has focus and a key is pressed.
onkeypress. Type: String
JavaScript to be executed when the image has focus and a key is pressed and released.
onkeyup. Type: String
JavaScript to be executed when the image has focus and a key is released.
onmousedown. Type: String
JavaScript to be executed when the mouse cursor is over the image 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 image.
onmouseout. Type: String
JavaScript to be executed when the user moves the mouse cursor away from the image after it has been over the image.
onmouseover. Type: String
JavaScript to be executed when the user moves the mouse cursor onto the image.
onmouseup. Type: String
JavaScript to be executed when the mouse cursor is over the image and the user releases the mouse button.
Advanced
dir. Type: String
An indicator of the directionality if the text does not inherit directionality (for example, because the text is English but the primary language for the page is Hebrew). Equivalent to the dir attribute of the HTML <input> tag.
Values can be:
LTR. Left-to-right.
RTL. Right-to-left.
ismap. Type: boolean
If selected, the image is a server-side image map and must be enclosed in a hyperlink.
lang. Type: String
Code describing the language used in the generated markup for the component. Equivalent to the lang attribute of the HTML <input> 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:
en-US - United States English
ja-JP - Japanese
zh-guoyu - Mandarin or Standard Chinese
zh-Hans - Simplified Chinese script
zh-HanT - Traditional Chinese script
rendered. Type: boolean
If selected, the component is to be rendered and processed on any subsequent page submission. If not selected, the component doesn't appear on the page at all, not even as a hidden component.
You can bind this property to a variable that determines when the component does get rendered. For example, an airline reservation form might show the component for frequent flyers and not show it for the general public. To bind this property, right-click the component in the Visual Designer and choose Property Bindings, and then select the All radio button to display all properties so you can select the rendered property.
usemap. Type: String
The name of a client-side image map for which this component provides the image.