Display Images in Oracle APEX Interactive Reports and Forms - Part 8
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
📷 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.
🗑️ 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.
🖼️ 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
💡Oracle Apex
💡Form Page
💡Mapping
💡Blob
💡Static Content Sub-region
💡CSS Class
💡PL/SQL Function
💡Delete Image Process
💡Interactive Report
💡Primary Key Violation
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
a very warm welcome to Tech mining
in previous part of this video we
created products set up using
interactive report and form page
in this video we will take a deep dive
into image handling in Oracle Apex open
form page 6 in page designer
modify properties for P6 product image
item to map table columns
this mapping is necessary to display
product image on details form page
[Music]
foreign
[Music]
foreign
[Music]
storage type attribute specifies where
uploaded files should be stored column
has to be of data type blob
show images of selected products on
Details page we will create a static
content sub-region
[Music]
at runtime images will be added to this
region in subsequent step sequence is
set to place this region before product
details region
[Music]
CSS class image item references rule you
created in previous video to place word
Nike in image
region will be displayed only when there
exists an image for a product and this
evaluation is made using a condition
based on a PL SQL function
[Music]
click product details region
turn off start new row property to place
this region beside product image region
you just added
[Music]
in this step we will create a new page
item to display product image in product
image region
right-click product image region
select create page item from Context
menu
set properties for new page item
[Music]
display image item type displays an
image stored in a database blob column
or based on an image URL
foreign
[Music]
style value in custom attributes sets a
blue background for image
[Music]
we also specified database image column
in its type
[Music]
by setting Row's returned condition
and using a SQL query we ensured
existence of an image in table
[Music]
an image can be removed from Details
page and consequently from underlying
table by clicking this button
right-click product image region
select create button
set properties for new button
it is attached to a process delete image
configured in next step
[Music]
at runtime button will appear on top of
region
[Music]
foreign
[Music]
calls a confirmation box this call is
made using an oracle Apex function Apex
confirm by passing a message and name of
delete button
if you click yes in confirmation box
process associated with delete button
removes image references from products
table
[Music]
this is process we talked about in
previous step it is associated with
delete button to remove a product image
click processing tab
then right-click processing node
select create process from Context menu
set properties for new process
[Music]
foreign
to remove an image stored in a database
table you are required to just replace
content of relevant columns with a null
[Music]
sequence is set to place it before close
dialog process
[Music]
this success message will display at
runtime
when button press delete image
processing node contains two more
processes process form product details
and close dialog that were created by
Page creation wizard
first one is created to handle DML
operations
while second one closes page six when
you click create save or delete button
values of these buttons are mentioned in
server-side condition of process which
specifies that dialog is to be closed
only when any of these three buttons are
clicked
clicking delete image button won't close
page because name of this button is not
in value list
similarly delete image process will only
be executed when delete image button is
pressed
that's it
save your work and click run application
button
[Music]
from Main navigation menu select manage
products from setup menu
on Main interactive report page note
that image detail column is blank at
moment because we do not have any
product image in table
this is column which will hold images of
products clicker Max 2090 Link in
product column to add image of this
product
on product Details page click folder
icon representing product image field at
bottom of page
this will bring up open dialog box
go to source code part 6 folder and
select one Air Max 2090 PNG file click
apply changes button on product details
form to save image
image will appear on interactive report
page
[Music]
repeat this step to add images of
remaining products
[Music]
after adding all respective images
[Music]
click view icons and view details
options on interactive report toolbar
and see output
[Music]
click view reports icon
click actions menu in interactive report
and select columns
[Music]
make sure all columns accept description
and last sold appear in display in
report column
[Music]
you can use Arrow icons to arrange
columns in a desired order
foreign
button
only columns you selected will appear in
interactive report
[Music]
click actions menu again
under report select save report
from Save drop down list select as
default report settings
set default report type to primary click
apply
after modifying an interactive report
you must save it using this procedure
each product is presented as a linked
icon
if you click any icon you will be taken
to form page page 6 where you'll see
details of selected product
also note remove image button you
created appears within this region
create a new product record by clicking
create button on products report page
open and select any small image file to
test image upload
in my case I'm using logo provided in
part 3 folder of source code
you can use any existing product image
by right-clicking that image and
selecting save image as
once you have an image in place fill in
all Fields except price
[Music]
try to save this record by clicking
create button a message price must have
some value will appear informing you to
provide some value for price
now provide some alphanumeric value like
abc123 for price
again a message will come up reminding
you to put a numeric value
finally input a numeric value in price
field and save record
you might encounter a primary key
violation message while creating first
product record
this is because sequence object for this
table is created with an initial value
of 1. when you try to save first product
record one is assigned as first primary
key value which already exists in table
to cope with this situation just click
create button on form page several times
after some clicks record will be saved
automatically
you'll see new product appears on
products page with image you uploaded
among with others
edit this record and see image
[Music]
change category of this product switch
availability to other option and apply
changes
foreign
call product again and observe changes
you just made to it
[Music]
click remove image button and see what
happens
[Music]
click delete button followed by OK in
confirmation box
product will vanish from list
[Music]
in next part of this video you'll
explore uploading and viewing PDF and
other types of files in interactive
report
thanks for watching
[Music]
浏览更多相关视频
How to Upload PDF, Audio, Video, and other Documents in Oracle APEX - Part 9
Interactive Report & Form Page Oracle APEX - Part 7
How To Add Different Types Of Background Images In Oracle APEX Applications - Part 41
Data Entry Form Oracle APEX - Part 20
Create Setup to Display Records In an Order Calendar - Part 28
Final Step of Order Creation Wizard (Order Summary) - Part 19
5.0 / 5 (0 votes)