Before You Begin
Purpose
This tutorial shows you how to build, use, and customize a Websheet Application in Oracle Application Express 5.1.
Time to Complete
Approximately 60 minutes
Background
Oracle Application Express (Oracle APEX) is a rapid web application development tool for the Oracle database. Using only a web browser and limited programming experience, you can develop and deploy professional applications that are both fast and secure. Oracle Application Express is available with the Oracle Database, whether it's on-premises or in the Oracle Cloud.
In this tutorial, you use Oracle Application Express Release 5.1 to create and modify a mobile web application.
Please keep in mind the following while running this tutorial:
- Logging into your Oracle Application
Express workspace: Your Oracle
Application Express workspace may reside in an
on-premises Oracle Database or in Oracle Database
Cloud Services. The login credentials differ
depending on where your workspace is located:
- Logging into Oracle Application Express in a Oracle Database Cloud Service: Reference the Oracle Help Center for your Oracle Database Cloud Service. To do this, go to the Oracle Help Center for Cloud, and select Platform or Infrastructure (depending on your service). From here, select your Database Cloud Service and the Get Started page will appear.
- Logging in to Oracle Application Express on-premises: From your browser, go to the location of your on-premises installation of your Oracle Application Express workspace provided by your Workspace Administrator.
- Application ID: Screenshots in this tutorial show a blurred Application ID. Your Application ID can be any value assigned automatically while creating the application.
- Schema: If you are accessing an Oracle Application Express workspace in Database Schema Service, you have one schema assigned to you with a schema name that you cannot change. If you are accessing the workspace in an on-premises Oracle database, you may have more than one schema assigned to your workspace by the Oracle Application Express Instance Administrator.
What Do You Need?
- Visit Oracle Help Center for Cloud.
- Access to an Oracle Database 11g or later release, either on-premises or in a Database Cloud Service.
- Oracle Application Express Release 5.1 into your Oracle Database (for on-premises only).
- At least one Oracle Application Express user provisioned. See Creating New User Accounts in Oracle Application Express Administration Guide.
- The files.zip file into your working directory.
Creating and Running a Websheet Application
Websheet applications are collections of pages that support wiki syntax. Each page can be organized into sections. Pages can also be organized into a hierarchy. Sections can be edited using a friendly editor.
Websheets provide the following functionality:
- Create and share content over the web using your browser.
- Organize web pages in a hierarchy and cross link pages (using [[ pagename ]] syntax).
- Create and manage tabular data using an embedded feature called Data Grids.
- Create interactive reports using SQL on existing data structures in your database.
- Expose Data Grid and Report data within pages as a chart or a report.
- Annotate pages with files, tags and notes.
- Associated images can be shown inline within page content (using [[image: filename]] syntax).
- Search page content (using search box in upper right hand).
- Manage who can log in and once logged in, who can read, write or administer the application (authentication and authorization).
-
In the Application Express login page, enter the following login credentials and click Sign In:
Workspace: obe
Username: obe
Password: oracle
-
After you login to your workspace, click the down arrow in the Application Builder tab and select Websheet Applications.
-
Click Create.
-
Click Websheet.
-
You might optionally get the following dialog if the required websheet database objects are not already created for your Database Schema Service. Click Manage Websheet Database Objects >. Alternatively, if you do not see the below dialog, you can skip the steps 3 to 6 and continue from step 7 of this OBE directly.
-
Click Next >.
-
Click Create.
-
The required websheet database objects are created. Now, click Create Websheet >.
-
Click Create Websheet.
-
Clcik Run Websheet.
-
If prompted, enter the credentials you used to log in to your Oracle Application Express workspace and click Log In. The Application is created with a default Home page.
To create a Websheet Application, perform the following steps:
Adding a Text Section to a Page
In this topic, you will create a text section called Overview in the Home page. The text to enter in the section is available in the overview.txt file. Perform the following steps:
-
Click the Create button and select New Section.
-
Ensure Text is selected and click Next >.
-
Enter Overview for Title. Open the overview.txt file and copy paste its contents to the Content field. Then, click Create Section.
-
The Overview section is added to the Home page.
-
Delete the Welcome to Websheets section. Click the edit icon and then click Delete.
Adding Annotations to a Page
You can annotate any page in your application with files, tags, and notes.
Adding a File
To add a file to the Home page, perform the following steps:
-
Click the Add File(+) icon in the Files section of the page.
-
Click Browse and choose the resources.xls file in the files folder and click Open. Then, click Add File.
-
The file is added to the page. Users can download and view the file by clicking the file name.
Adding a Tag
Tags enable you to organise your content for an easier search. To add a tag to a page, perform the following steps:
-
Click the Add Tag (+) icon in the Tags section of the page.
-
Enter samples in the Tags field and click Add Tags.
-
The tag is added to the page.
-
At a later point in time if you want to view the tags you have added, click the View button and select Tags.
-
The samples tag you had created is listed. Click the samples tag.
-
The pages that are tagged with this samples tag are listed. Click the Home breadcrumb to return to the Home page.
Adding a Note
To add a note, perform the following steps:
-
Click the
Adding a Note
To add a note, perform the following steps:
-
Click the Add Note (+) icon in the Notes section of the page.
-
Add New resources file has been added. in the Note field and click Add Note.
-
The note is added to the page. You can click the pencil icon to edit the note.
-
Displaying a Image
You can include images in your pages by using the syntax [[IMAGE:<filename>]]. The image that you are referring to should be added to the files section of the page. To display an image in a page, perform the following section.
-
Click the Add File (+) icon in the Files section of the page.
-
Click Choose File and locate the hr_logo image from the files folder. Then, click Add File.
-
The hr_logo image is added to the page.
-
Click the Edit icon for the Overview section.
-
To display the image in this section, enter [[IMAGE:hr_logo.jpeg]] under the existing text in the Content field and click Apply Changes.
-
The image is displayed in the page under the Overview section.
Creating a Data Grid
Data Grids allow you to create tabular data. You can create a data grid from scratch or by copy-pasting data from a spreadsheet.
Creating a Data Grid From Scratch
To create a data grid from scratch, perform the following steps:
-
From the Control Panel, click New Data Grid. Alternatively, you can click Data Grid drop-down menu and select New Data Grid.
-
Ensure that From Scratch is selected and click Next >.
-
Enter Deadlines for Name. Enter Event in the first Column Name field. Enter Date in the second Column Name field and Date for Type. Then, click Create Data Grid.
-
The data grid is created. To add data to the data grid, click Add Row.
-
Enter Update Payroll for Event and select a date for Date. Click Save and Add Another.
-
Enter Complete New Hire Training for Event and select a date for Date. Click Save.
-
The data is added to the data grid.
Creating a Data Grid From a Spreadsheet
To create a data grid from data in a spreadsheet, perform the following steps:
-
Click the Create drop-down menu and select New Data Grid. Alternatively, you can click Data Grid drop-down menu and select New Data Grid.
-
Select Copy and Paste and click Next >.
-
Enter Tasks in the Name field. Copy the data from the task.xls file and paste it in the Paste Spreadsheet Data field. Click Upload.
-
The spreadsheet data is added to the Tasks data grid.The data grid is created.
Creating a New Page as a Copy
In this section, you will create a new page as a copy of the existing Home page and customize the new page. To create a new page, perform the following steps:
-
Click the Create drop-down menu and select New Page as a Copy.
-
Enter Reports for New Page Name and click Copy Page.
-
Click View New Page.
-
Click the Edit icon for the Overview section.
-
Delete the existing content and enter This page contains some useful reports. in the Content field and click Apply Changes.
-
The section is updated.
Creating a Data Section Based on Data From a Data Grid
In this section, you will create a data section in the new page. Perform the following steps:
-
From the Control Panel section, click New Section.
-
Select Data and click Next.
-
Select Deadlines for Data Grid and select Primary Report for Report Settings to Use. Enter Deadlines For This Month in the Title field and select Next >.
-
Click Create Section.
-
A report on the Deadlines data gird is created in a new section.
Creating a Chart Section Based on Data From a Data Grid
In this section, you create a chart section based on data from a data grid. Perform the following steps:
-
Click Create and select New Section.
-
Select Chart and click Next >.
-
Accept the default for chart type and click Next >.
-
Select Tasks for Data Grid and Primary Report for Report Settings to Use. Enter Cost Per Project for Section Title and click Next >.
-
Select PROJECT for Chart Label and COST for Chart Value. Enter Projects for Axis Title for Label and Cost for Axis Title for Value. Then, click Next >.
-
Click Create Section.
-
A chart is created in a new section in the page.
Creating a Section Navigation
In this section, you will create a section navigation for all the sections in the Reports page. Perform the following steps:
-
From the Control Panel, select New Section.
-
Select Navigation and click Next >.
-
Select Section Navigation and click Next >.
-
Enter Sections for Title and click Create Section.
-
The navigation section is created, but it is the last section on your page. You want to move the navigation section to the top of the page. Click Edit Sections from the Control Panel.
-
Click the up icon for Sections till it is the topmost section in the list and click Apply Changes.
-
The navigation section is moved to the top of the page.
Viewing a Page in Presentation Mode
In this section, you will view the Reports page in Presentation mode. Perform the following steps:
-
Click the Presentation Mode icon from the top-right toolbar. Alternatively, you can click View and select Presentation Mode.
-
The first section in the page is displayed. You can move to the next section by clicking the next icon.
-
To close the presentation mode, click the cross (X) icon.
Creating Page Navigation
In this section, you create a page navigation section on the Home page. Perform the following steps:
-
Click New Section from Control Panel.
-
Select Navigation and click Next >.
-
Ensure that Page Navigation is selected for Navigation Type and click Next >.
-
Enter Pages for Title and select Created Date for Order Siblings By. Click Create Section.
-
The page navigation section is created.
Viewing Page History
In this section, you will view the history for a page. Perform the following steps:
-
Click the View history link at the bottom of the page. Alternatively, you can click View and select Page History.
-
The history for the page is displayed. Click the Home breadcrumb to return to the Home page.
Searching in a Websheet
In this section, you will search the entire websheet for the word "Projects". Perform the following steps:
-
Enter Projects in the top-right search bar and click Enter.
-
A report listing all the occurances of the search string is displayed. Click the Home breadcrumb to return to the Home page.
Creating Oracle Application Express Users
In order to share Websheets, it is necessary to define appropriate access control for the other Oracle Application Exprses users. In this topic, you will create three Oracle Application Express users. Perform the following steps:
-
Click the Administration icon and select Manage Users and Groups.
-
Click the Create User >.
-
Enter WS_ADMIN for Username and ws_admin@oracle.com for Email Address. Ensure that User is an administrator is set to Yes and enter oracle for Password (not shown in the screenshot). Then, click Create and Create Another.
-
Enter WS_CONTRIBUTOR for Username and ws_contributor@oracle.com for Email Address. Select No for User is an administrator and enter oracle for Password (not shown in the screenshot). Then, click Create and Create Another.
-
Enter WS_READER for Username and ws_reader@oracle.com for Email Address. Select No for User is an administrator, No for User is a Developer and enter oracle for Password (not shown in the screenshot). Then, click Create User.
Sharing Websheets Using an Access Control List
In this section, you will create an Access Control List for the websheet. Perform the following steps:
-
Click the Applicaiton Builder tab and select Websheet Applications.
-
Click the websheet application run icon.
-
Click Administration and select Access Control.
-
Click Create Entry >.
-
Enter ws_reader for Username and click Create and Create Another.
-
Enter ws_contributor for Username, select Contributor for Privilege, and click Create and Create Another.
-
Enter ws_admin for Username, Administrator for Privilege, and click Create.
-
Now you need to change your Authorization Scheme to use the Access Control List you have just created. Click the websheet application edit icon.
-
Click the Authorization region and select Custom. Then click Apply Changes.
-
Click Run.
-
Login as the ws_contributor user.
-
Click Administration and note that only the option to change the password is available.
-
Login again as the ws_reader user.
-
Note that the options to create and edit content are disabled.