Name
<h:graphicImage>
Synopsis
This action represents an instance of
the
component type registered with the type ID
javax.faces.HtmlGraphicImage
(by default, an
instance of the
javax.faces.component.html.HtmlGraphicImage
class), combined with a renderer registered with the renderer type ID
javax.faces.Image
.
The component is rendered as an HTML <img>
element with a src
attribute holding the
component’s value or the url
attribute value, adjusted to a context-relative path if it starts
with a slash and with encoded session ID information if necessary.
Syntax
<h:graphicImage [id="id
"] [binding="componentBinding
"] [rendered="true
|false"] [value="value
" | url="imageURL
"] <!-- HTML attributes --> [alt="altText
"] [dir="ltr|rtl"] [height="height
"] [ismap="true|false
"] [lang="lang
"] [longdesc="descURI"] [onclick="code
"] [ondblclick="code
"] [onkeydown="code
"] [onkeypress="code
"] [onkeyup="code
"] [onmousedown="code
"] [onmousemove="code
"] [onmouseout="code
"] [onmouseover="code
"] [onmouseup="code
"] [style="style
"] [styleClass="styleClass
"] [title="title
"] [usemap="mapName
"] [width="width
"] />
Attributes
Attribute name |
Java type |
EL expression type |
Description |
binding |
String |
VB |
Must be a value binding expression for a property the component is bound to. |
id |
String |
None |
The component ID. |
rendered |
boolean |
Any |
If set to |
url |
String |
Any |
The image resource URL. An alias for the |
value ... |
Get JavaServer Faces now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.