Ticker

6/recent/ticker-posts

Display Image Item in Oracle APEX - Javainhand Tutorial

 Today I will describe to Display Image Item in Oracle APEX.

Display Image Item in Oracle APEX

Today Topic
What is Display Image Item in Oracle APEX?
How to Display Image using Display Image Item in Oracle APEX?

What is Display Image Item in Oracle APEX?

Display Image Item is a type of oracle apex page item. You can display your database table image into this page item or either you can display your application static images also.


Basically, Display Image Item has three different settings to display your database image or static image
.
  1. Image URL stored in Page Item Value
  2. Blob Column specified in the item source
  3. Blob Column returned by SQL statement

How to Display Image Using Display Image Item in Oracle APEX?

In this section, I will describe all about the above display image item settings with examples.

Image URL Stored in Page Item Value

Whenever you want to display an image using a URL then you have to choose this setting in the display image item. Let's take a simple example for better understanding.

Step 1:- Create a page item and select a display image item. Now go to the display image page item settings and select the image URL Stored in Page Item Value option. You can match the following screenshot for a better understanding.


Step 2:- Now scroll down your page item property, Go to page item source area and choose any source type method to return the image URL. Here I am selecting SQL Query(Return Single Value) option. You can also choose different options to return the image URL.
SELECT 'https://www.oracle.com/a/ocom/img/dc/em/oracle-apex.png' FROM dual
You can also match with the following screen.


Blob Column specified in the item source

Whenever you choose display image item setting BLOB column specified in the item source it means that the display image page item source is a database column and the column type will be a BLOB otherwise it returns an errorBLOB column specified in the item source option will display the database table image using the automatic row fetch processing process.

Step 1:- Create a Before Header Process for fetch image from a particular table using Automatic Row Fetch. You have to also create the table's primary key page items. You can match the following screen.

Step 2:- Now scroll down your page item property, Go to page item source area and select (DATABASE COLUMN TYPE), and pass table BLOB column type. You can match the following screen.


Blob Column Returned By SQL Statement

As you understand with the statement that you have written a SQL query which is return the BLOB column.

Step 1:-Whenever you choose the display item setting(Blob column returned by the SQL statement) option. Then a SQL statement tap opens where you have to write a SQL query that returns the BLOB column.

SELECT IMAGE FROM EMP
WHERE MIMETYPE='image/jpeg'
AND EMPNO=8222
You can match the following screen.

That's all for today I think Display Image Item in Oracle APEX post will helpful for you. If you like this post then share your view in the comment box. Also, Share this post with your friends and also share in the oracle apex related group.

Post a comment

0 Comments