If you have access to images in your Web project, you can display
them in a data table or elsewhere on a Faces JSP page.
You can drag an Image component to an area of a Faces JSP page or
to several other components and then define the image.
In the following
steps, start with a data table component on your Faces JSP page and a relational
record list bound to a table in your database that contains images.
- Add a column for your images to your data table.
- Drag an Image component from the Faces Components drawer into the
new column.
- Drag an image field from the Page Data view onto the image component. This action binds the image component to the image field in your
database table.
- In the Properties view for the Image component, specify the Type attribute
for the image.
- One way to specify the file type of the image is to specify
it explicitly in the Type attribute field. Specify
it as a correct MIME type (for example: image/gif).
- The other way is to generate your table to include an additional
column, which will hold the MIME type of the image (for example: image/gif).
Then in the Type field, browse to and select the image
type from your data object.
- To control the size of the image when it displays within your data
table, enter values for Width and Height.
When you save this page and run it on your server, the image displays
in the data table.