Display Images in Oracle APEX Interactive Reports and Forms - Part 8

Tech Mining
21 Oct 202213:25

Summary

TLDRThis Tech mining video tutorial dives into managing images in Oracle Apex, focusing on the setup of an interactive form page for product images. It guides viewers through mapping table columns, creating a static content sub-region for image display, and using PL/SQL functions for conditional image visibility. The tutorial also covers creating a page item for image display, setting up a delete image process, and handling DML operations. Viewers learn to upload images, test image upload functionality, and manage product records, including editing and removing images, ensuring a comprehensive understanding of image handling in Oracle Apex.

Takeaways

  • πŸ“š The video is a tutorial on setting up image handling in Oracle Apex, focusing on the open form page.
  • πŸ–ΌοΈ It explains how to modify properties for the 'P6 product image' item to map table columns for displaying product images on a details form page.
  • πŸ” The script details the creation of a static content sub-region to show images of selected products on the details page at runtime.
  • πŸ‘‰ The tutorial walks through the process of creating a new page item for displaying product images within the product image region.
  • 🎨 It mentions setting a CSS class for the image item and using a PL/SQL function to conditionally display the image based on its existence.
  • πŸ”„ The video describes how to create a button for removing images from the details page and the underlying table through a confirmation process.
  • πŸ› οΈ The script includes instructions for creating a process to delete images from the database by setting conditions and using SQL queries.
  • πŸ“ It highlights the importance of saving changes to the interactive report and setting default report settings after modifications.
  • πŸ”„ The tutorial demonstrates how to add images to products using the product details page and an open dialog box.
  • πŸ“Š The script explains how to arrange and save column preferences in the interactive report for customized views.
  • πŸ†• It covers creating a new product record, handling image uploads, and dealing with data validation for fields like price.
  • πŸ—‘οΈ The video concludes with instructions on how to edit records, change product details, and remove images using the remove image button.

Q & A

  • What is the main focus of the video script provided?

    -The video script focuses on demonstrating how to handle image management in Oracle Apex, specifically on an open form page, including setting up product images, mapping table columns, and creating interactive elements to display and manage these images.

  • What is the purpose of mapping the product image item to table columns in Oracle Apex?

    -Mapping the product image item to table columns is necessary to display the product image on the details form page, ensuring that the correct image is associated with the correct product data.

  • What type of data type should the column have to store uploaded files in Oracle Apex?

    -The column should have a data type of BLOB (Binary Large Object) to store the uploaded files, such as images.

  • How can images of selected products be displayed on the Details page in Oracle Apex?

    -Images can be displayed on the Details page by creating a static content sub-region where images will be dynamically added at runtime based on the selected product.

  • What is the role of the CSS class 'image' in the Oracle Apex form page?

    -The CSS class 'image' is used to style the image item, potentially setting properties such as background color or other visual aspects of how the image is presented on the form page.

  • How is the visibility of the image region determined in the Oracle Apex form page?

    -The visibility of the image region is determined by a condition that checks for the existence of an image for a product. This evaluation is made using a PL/SQL function.

  • What is the process to create a new page item to display the product image in Oracle Apex?

    -To create a new page item, right-click on the product image region, select 'Create Page Item' from the context menu, and then set the necessary properties for the new page item, such as the display type and the database image column.

  • How can an image be removed from the Details page in Oracle Apex?

    -An image can be removed by creating a button with a process attached to it that calls a confirmation box. If the user confirms, the process associated with the delete button removes the image references from the products table.

  • What is the significance of the 'Row's returned condition' in the context of the Oracle Apex form page?

    -The 'Row's returned condition' is used to ensure that certain elements, like the image, are only displayed when there is an image available for the product, enhancing the user interface by showing relevant content only.

  • How can a new product record with an image be added in Oracle Apex?

    -To add a new product record with an image, navigate to the product details page, click the folder icon representing the product image field, select an image file, and then save the changes on the product details form.

  • What should be done if a primary key violation occurs when creating the first product record in Oracle Apex?

    -If a primary key violation occurs, it is likely due to the initial value of the sequence object for the table. The solution is to repeatedly click the 'Create' button on the form page until the record is saved automatically, as the sequence will eventually assign a new primary key value.

Outlines

00:00

πŸ“· Image Handling in Oracle Apex

This paragraph introduces the process of handling images in Oracle Apex, focusing on setting up an interactive report and form page to display product images. It explains the necessity of mapping table columns for product images and creating a static content sub-region to display these images. The paragraph also details the use of a CSS class and a PL SQL function to conditionally display images and the creation of a button to remove images from the database.

05:11

πŸ—‘οΈ Removing Product Images

This section delves into the functionality of removing product images from the database using Oracle Apex. It describes the use of an Apex function to confirm deletion and the creation of a process to remove image references from the products table. The paragraph outlines the steps to replace the content of the relevant columns with null values and ensure that the delete image process is executed only when the delete image button is pressed.

10:15

πŸ–ΌοΈ Managing Product Images in Interactive Reports

The final paragraph covers the management of product images in interactive reports within Oracle Apex. It guides through the process of adding images to products, saving and modifying interactive reports, and testing image upload functionality. The paragraph also addresses potential issues such as primary key violations when creating product records and provides a solution. It concludes with instructions on how to edit records, change product categories, and observe the effects of these changes.

Mindmap

Keywords

πŸ’‘Tech mining

Tech mining refers to the process of extracting and analyzing data from technology-related content, which can include software, hardware, and digital processes. In the context of this video, it likely refers to the exploration of technical features within Oracle Apex, a web application development environment. The video script discusses the creation and management of a product set up, indicating that tech mining in this case is about uncovering and utilizing Oracle Apex's capabilities for product image handling.

πŸ’‘Oracle Apex

Oracle Apex is a low-code development platform for creating enterprise web applications. It is used to develop, deploy, and manage data-driven applications on the Oracle Database. The video script focuses on using Oracle Apex to handle image uploads and display in a form page, showcasing its functionality for interactive report and form page creation.

πŸ’‘Form Page

A form page in web development is a user interface that allows users to input data into a system. In the script, the form page is used in Oracle Apex to set up product details, including the handling of product images. The video explains how to modify properties for a product image item on a form page to map table columns, which is essential for displaying product images.

πŸ’‘Mapping

In the context of databases and web development, mapping refers to the process of linking or associating data from one structure to another. The script describes the necessity of mapping table columns to display product images on a details form page, which is a key step in ensuring that the images are correctly associated with their respective products in the database.

πŸ’‘Blob

BLOB stands for Binary Large Object and is a data type used to store large binary files such as images, audio, and video. The script mentions that the storage type attribute specifies where uploaded files should be stored, and the column for this must be of data type BLOB, indicating that Oracle Apex is being used to handle large image files for product images.

πŸ’‘Static Content Sub-region

A static content sub-region is a part of a web page that remains unchanged regardless of user interaction. In the video, a static content sub-region is created to display images of selected products on the details page. At runtime, images are dynamically added to this region, demonstrating the combination of static layout with dynamic content in web application design.

πŸ’‘CSS Class

CSS, or Cascading Style Sheets, is used for describing the presentation of a document written in HTML or XML. A CSS class is a type of selector that can be applied to HTML elements to define their style. In the script, a CSS class is used to set a blue background for the image, showing how CSS is used in conjunction with Oracle Apex to style the appearance of the product images.

πŸ’‘PL/SQL Function

PL/SQL is Oracle's procedural language extension to SQL, used for stored procedures and other batch jobs. A PL/SQL function is a named PL/SQL block that performs a specific task. The script refers to a PL/SQL function used to evaluate the existence of an image for a product, demonstrating the use of server-side logic to conditionally display content in Oracle Apex.

πŸ’‘Delete Image Process

The delete image process is a sequence of actions defined in Oracle Apex to handle the removal of an image from a product. The script describes how this process is attached to a delete button, which, when clicked, calls a confirmation box and, if confirmed, removes the image reference from the products table. This illustrates the use of Oracle Apex's process capabilities for managing data integrity and user interactions.

πŸ’‘Interactive Report

An interactive report in Oracle Apex is a feature that allows users to view, sort, filter, and manipulate data in a tabular format. The script mentions using an interactive report to manage product records, including the addition of images and the ability to save report settings as default. This highlights the interactive and dynamic nature of reports in Oracle Apex for data management.

πŸ’‘Primary Key Violation

A primary key violation occurs when an attempt is made to insert a duplicate value into a column that is defined as a primary key in a database. In the script, the issue of primary key violation is mentioned when creating the first product record, due to the sequence object's initial value. The script suggests a workaround by repeatedly clicking the create button until the record is saved, illustrating a common troubleshooting step in database management.

Highlights

Introduction to creating product setups using interactive report and form page in Oracle Apex.

Deep dive into image handling in Oracle Apex open form page.

Modification of properties for product image item to map table columns.

Necessity of mapping for displaying product image on details form page.

Creation of a static content sub-region to show images of selected products.

Use of CSS class and PL SQL function for conditional image display.

Placement of product details region beside the product image region.

Creation of a new page item to display product image in the product image region.

Setting properties for the display image item type for database blob column storage.

Implementation of a delete image button with confirmation dialog using Oracle Apex functions.

Process creation for removing image references from the products table.

Ensuring the delete image process is only executed when the delete image button is pressed.

Testing image upload functionality on the product details page.

Adding images to products via the interactive report page.

Viewing and managing product images in the interactive report.

Dealing with primary key violation when creating the first product record.

Editing product records and observing changes made to the product image.

Removing product images and observing the impact on the product list.

Upcoming exploration of uploading and viewing PDF and other file types in the interactive report.

Transcripts

play00:00

a very warm welcome to Tech mining

play00:02

in previous part of this video we

play00:04

created products set up using

play00:06

interactive report and form page

play00:09

in this video we will take a deep dive

play00:11

into image handling in Oracle Apex open

play00:14

form page 6 in page designer

play00:17

modify properties for P6 product image

play00:19

item to map table columns

play00:22

this mapping is necessary to display

play00:24

product image on details form page

play00:27

[Music]

play00:28

foreign

play00:31

[Music]

play00:34

foreign

play00:35

[Music]

play00:45

storage type attribute specifies where

play00:48

uploaded files should be stored column

play00:50

has to be of data type blob

play00:53

show images of selected products on

play00:55

Details page we will create a static

play00:57

content sub-region

play00:59

[Music]

play01:14

at runtime images will be added to this

play01:17

region in subsequent step sequence is

play01:20

set to place this region before product

play01:22

details region

play01:23

[Music]

play01:33

CSS class image item references rule you

play01:37

created in previous video to place word

play01:39

Nike in image

play01:42

region will be displayed only when there

play01:45

exists an image for a product and this

play01:46

evaluation is made using a condition

play01:48

based on a PL SQL function

play01:51

[Music]

play02:16

click product details region

play02:19

turn off start new row property to place

play02:21

this region beside product image region

play02:23

you just added

play02:25

[Music]

play02:31

in this step we will create a new page

play02:33

item to display product image in product

play02:36

image region

play02:37

right-click product image region

play02:40

select create page item from Context

play02:42

menu

play02:43

set properties for new page item

play02:46

[Music]

play02:50

display image item type displays an

play02:52

image stored in a database blob column

play02:54

or based on an image URL

play02:58

foreign

play03:04

[Music]

play03:15

style value in custom attributes sets a

play03:18

blue background for image

play03:20

[Music]

play03:32

we also specified database image column

play03:35

in its type

play03:36

[Music]

play03:42

by setting Row's returned condition

play03:45

and using a SQL query we ensured

play03:47

existence of an image in table

play03:51

[Music]

play04:02

an image can be removed from Details

play04:04

page and consequently from underlying

play04:07

table by clicking this button

play04:09

right-click product image region

play04:12

select create button

play04:14

set properties for new button

play04:17

it is attached to a process delete image

play04:20

configured in next step

play04:26

[Music]

play04:32

at runtime button will appear on top of

play04:34

region

play04:35

[Music]

play04:50

foreign

play04:55

[Music]

play05:11

calls a confirmation box this call is

play05:15

made using an oracle Apex function Apex

play05:17

confirm by passing a message and name of

play05:20

delete button

play05:21

if you click yes in confirmation box

play05:24

process associated with delete button

play05:26

removes image references from products

play05:28

table

play05:29

[Music]

play05:31

this is process we talked about in

play05:33

previous step it is associated with

play05:36

delete button to remove a product image

play05:39

click processing tab

play05:42

then right-click processing node

play05:45

select create process from Context menu

play05:48

set properties for new process

play05:51

[Music]

play06:00

foreign

play06:04

to remove an image stored in a database

play06:07

table you are required to just replace

play06:09

content of relevant columns with a null

play06:16

[Music]

play06:20

sequence is set to place it before close

play06:22

dialog process

play06:25

[Music]

play06:34

this success message will display at

play06:36

runtime

play06:40

when button press delete image

play06:47

processing node contains two more

play06:49

processes process form product details

play06:52

and close dialog that were created by

play06:55

Page creation wizard

play06:57

first one is created to handle DML

play06:59

operations

play07:00

while second one closes page six when

play07:03

you click create save or delete button

play07:06

values of these buttons are mentioned in

play07:08

server-side condition of process which

play07:10

specifies that dialog is to be closed

play07:13

only when any of these three buttons are

play07:15

clicked

play07:15

clicking delete image button won't close

play07:18

page because name of this button is not

play07:20

in value list

play07:22

similarly delete image process will only

play07:24

be executed when delete image button is

play07:26

pressed

play07:28

that's it

play07:29

save your work and click run application

play07:31

button

play07:32

[Music]

play07:41

from Main navigation menu select manage

play07:45

products from setup menu

play07:47

on Main interactive report page note

play07:49

that image detail column is blank at

play07:51

moment because we do not have any

play07:54

product image in table

play07:56

this is column which will hold images of

play07:58

products clicker Max 2090 Link in

play08:01

product column to add image of this

play08:03

product

play08:04

on product Details page click folder

play08:07

icon representing product image field at

play08:09

bottom of page

play08:11

this will bring up open dialog box

play08:14

go to source code part 6 folder and

play08:17

select one Air Max 2090 PNG file click

play08:21

apply changes button on product details

play08:23

form to save image

play08:25

image will appear on interactive report

play08:27

page

play08:28

[Music]

play08:31

repeat this step to add images of

play08:33

remaining products

play08:34

[Music]

play08:48

after adding all respective images

play08:53

[Music]

play08:56

click view icons and view details

play08:58

options on interactive report toolbar

play09:01

and see output

play09:03

[Music]

play09:22

click view reports icon

play09:25

click actions menu in interactive report

play09:27

and select columns

play09:29

[Music]

play09:35

make sure all columns accept description

play09:38

and last sold appear in display in

play09:40

report column

play09:41

[Music]

play09:52

you can use Arrow icons to arrange

play09:54

columns in a desired order

play09:57

foreign

play09:59

button

play10:01

only columns you selected will appear in

play10:03

interactive report

play10:05

[Music]

play10:15

click actions menu again

play10:18

under report select save report

play10:21

from Save drop down list select as

play10:24

default report settings

play10:26

set default report type to primary click

play10:29

apply

play10:30

after modifying an interactive report

play10:32

you must save it using this procedure

play10:34

each product is presented as a linked

play10:37

icon

play10:38

if you click any icon you will be taken

play10:40

to form page page 6 where you'll see

play10:43

details of selected product

play10:46

also note remove image button you

play10:48

created appears within this region

play10:53

create a new product record by clicking

play10:55

create button on products report page

play10:58

open and select any small image file to

play11:01

test image upload

play11:02

in my case I'm using logo provided in

play11:05

part 3 folder of source code

play11:07

you can use any existing product image

play11:09

by right-clicking that image and

play11:11

selecting save image as

play11:13

once you have an image in place fill in

play11:16

all Fields except price

play11:18

[Music]

play11:24

try to save this record by clicking

play11:26

create button a message price must have

play11:29

some value will appear informing you to

play11:31

provide some value for price

play11:33

now provide some alphanumeric value like

play11:36

abc123 for price

play11:38

again a message will come up reminding

play11:40

you to put a numeric value

play11:42

finally input a numeric value in price

play11:45

field and save record

play11:47

you might encounter a primary key

play11:49

violation message while creating first

play11:51

product record

play11:52

this is because sequence object for this

play11:55

table is created with an initial value

play11:56

of 1. when you try to save first product

play11:59

record one is assigned as first primary

play12:02

key value which already exists in table

play12:06

to cope with this situation just click

play12:09

create button on form page several times

play12:12

after some clicks record will be saved

play12:14

automatically

play12:15

you'll see new product appears on

play12:17

products page with image you uploaded

play12:19

among with others

play12:20

edit this record and see image

play12:22

[Music]

play12:31

change category of this product switch

play12:33

availability to other option and apply

play12:35

changes

play12:36

foreign

play12:42

call product again and observe changes

play12:44

you just made to it

play12:46

[Music]

play12:48

click remove image button and see what

play12:50

happens

play12:51

[Music]

play13:02

click delete button followed by OK in

play13:04

confirmation box

play13:10

product will vanish from list

play13:13

[Music]

play13:14

in next part of this video you'll

play13:17

explore uploading and viewing PDF and

play13:19

other types of files in interactive

play13:21

report

play13:22

thanks for watching

play13:24

[Music]

Rate This
β˜…
β˜…
β˜…
β˜…
β˜…

5.0 / 5 (0 votes)

Related Tags
Oracle ApexImage HandlingInteractive ReportsDatabase BlobProduct ImagesForm PagesPL/SQL FunctionsImage UploadDelete ProcessContent ManagementTech Tutorial