Express Web 2.0By David Peake
Create dynamic interfaces that minimize page refresh with Oracle Application Express.
The term Web 2.0 refers to a second generation of Web-based applications that emphasize online collaboration, participation, and interactivity. This includes social networking sites, wikis, and communication tools.
The following are some of the Web 2.0 features and capabilities of Oracle Application Express:
For more details on Web 2.0 features in Oracle Application Express, including sample applications and additional code snippets, go to oracle.com/technetwork/products/database/application_express/html/web2.0.html.
Step-by-Step Instructions for Adding Tooltips
The following steps demonstrate how to integrate Ajax-powered tooltips into an Oracle Application Express application. The o57browser.zip file provides the SQL and the images used to develop the tooltips in this column.
Step 1. Download and unzip the Aria employee lookup application , and install it in your local Oracle Application Express instance or in the public instance at apex.oracle.com . Select Application Builder -> Import -> Application , click Browse , select the aria_people_search_installer-0.91.sql file from the downloaded application files, and click Next .
Step 3. Add the code to create the tooltip structure, including the image layout. In the application builder and the Aria application, click Page 0 to display the page definition. In the Regions section, click the Create (+) icon, and then click HTML (on two successive screens). Enter a title, select No Template from the Region Template list, select After Header from the Display Point list, and click Next . Enter the HTML from Listing 1 as the region source, and click Create Region .
Code Listing 1: Code for creating a tooltip structure, including image layout
Step 4. Create an on-demand application process named Person_Detail. Select Shared Components -> Logic -> Application Processes , click Create , enter Person_Detail in the Name field, select On Demand: Run this application process when requested by a page process from the Process Point list, and click Next . In the Process Text field, enter aria_detail; , click Next , and click Create Process .
Step 5. Install the aria_detail procedure (provided as part of the o57browser.zip download for this column). Select SQL Workshop -> SQL Scripts -> Upload , click Browse , choose the aria_detail.sql file, and click Upload .
onmouseover= "ARIA_DETAIL(this, '#PERSON_ID#')"
To create the tooltip shown in Figure 2, select Shared Components -> User Interface -> Templates , and under the Report Type, click Person_Detail . In the Row Template 1 text field, replace
<td valign="top"> <a href="f?p=&APP_ID.:2:&SESSION.::NO::PERSON_ID:#MGR_PERSON_ID#"> #MANAGER_NAME#</a>
<td valign="top"> <a href="f?p=&APP_ID.:2:&SESSION.::NO::PERSON_ID:#MGR_PERSON_ID#" onmouseover="ARIA_DETAIL( this,'#MGR_PERSON_ID#')"> #MANAGER_NAME#</a>
Finally, run the application to see your tooltips in action. Figure 1 shows an example tooltip appearing over a name in a list of results. Figure 2 shows an example tooltip appearing over a manager name in a detail result.
Oracle Application Express is a very easy-to-use, rapid development tool optimized for building Web 2.0-enabled applications. The underlying framework provides built-in declarative Web 2.0 capabilities and several "hooks" and APIs to enable developers to readily incorporate Web 2.0 functionality.
David Peake (email@example.com) is a principal product manager in Oracle's Server Technologies division. He has been with Oracle since 1993.