Displays a bitmap in GIF or JPEG format. The width and height of the image can be specified.
· alt
Defines an alternative text for the 'src' attribute. If the 'src' bitmap cannot be found or opened (for example, unrecognized graphic format) the 'alt' text is displayed with an red X in front of it and surrounded by a frame indicating the bitmap size.
If no 'tooltip' attribute is set for the image the alternative text is displayed as the mouse cursor passes over the image, or as the mouse button is pressed but not released.
· height
Defines the height of the bitmap. If 'height' is omitted the height of the image is determined by the bitmap itself.
· hoverMenuId
Defines which hover menu is displayed for this tree node. You can define different trigger methods to display the hover menu. For more details, see hover menu.
· id
Identification name of the image.
· imageMapId
Identification name of the imageMap control that is associated with the image. The imageMap control allows you to define areas on the image that are clickable. The areas can be associated with a link or an event. For more details on imageMap, see imageMap control description.
· src
Name of bitmap (=source). The name of the bitmap is case sensitive. To have access to MIME delivered with the portal see "accessing MIME". The images are usually stored in the public resource path of the component in the subfolder /images. The public resource path can be determined with the JSP command:
<% String PublicURL = componentRequest.getPublicResourcePath(); %>
You can also get the complete path to image include the subfolder /mimes with the command:
<% String
ImageURL = componentRequest.getPublicResourcePath() +
"/../mimes/"; %>
We use the string variable ImageURL in following table to demonstrate the setting of the src attribute.
Another possibility is to get the full URL of the image and set the src attribute in a scriptlet.
<%
IResource rs =
componentRequest.getResource(IResource.IMAGE,
"../mimes/mypicture.gif");
image.setSrc(rs.getResourceInformation().getURL(componentRequest));
%>
· tooltip
Defines the hint of the image which is displayed as the mouse cursor passes over the image, or as the mouse button is pressed but not released.
· width
Defines the width of the bitmap. If 'width' is omitted the width of the image is determined by the bitmap itself.
Attributes |
M |
Values |
Usage |
alt |
* |
String
|
Taglib Classlib |
height |
|
Unit |
Taglib Classlib |
hoverMenuId |
|
String |
Taglib Classlib |
id |
* |
String (cs)
|
Taglib Classlib |
imageMapId |
|
String (cs) |
Taglib Classlib |
src |
* |
String (cs) |
Taglib Classlib |
tooltip |
|
String |
Taglib Classlib |
width |
|
Unit |
Taglib Classlib |
using the taglib
<hbj:image |
using the classlib
IPortalComponentRequest request = |