6.4. Rich User Interfaces

In the past few years, users have come to expect rich media, such as images, as a standard part of their applications. These expectations had to be met with enhanced functionality in underlying databases as well as application development environments. With APEX, you can add graphical and multimedia user interface elements as easily as using more standard types of data.

Before you can use, in this case, images in your APEX application, you will have to modify a table in which to store them and then use an SQL script to load them.

Try It Out: Adding Columns to Support Images to a Table

Your first step is to go to the SQL Workshop and add some columns to your PRODUCTS table to store images of the products. You will have to add a column to hold the image, and also a few more columns to support the automatic functionality used with images in an APEX application.

  1. Return to the development environment and go to the SQL Workshop by clicking on the appropriate tab.

  2. Use the Object Browser to access your tables.

  3. Select the PRODUCTS table in the left-hand panel. Click the Add Column button to add the first column.

The page shown in Figure 6-34 shows the completed page for the first column you will add, the column that will hold the actual image.

  1. Give the new column the name of PRODUCT_IMAGE in the Add Column field, allow it to be NULL, and set the type to BLOB. Click Next and then confirm the addition by clicking the Finish button.

If you are unfamiliar with relational ...

Get Beginning Oracle® Application Express now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.