In this part of the tutorial you create the editable list of Departments workbook, a basic workbook that contains a table of department records.
-
Right-click the ViewController project in the Navigator and select New > From Gallery... in the context menu.
In the New Gallery, expand the Client Tier node if it is not already expanded, and select ADF Desktop Integration.
Select Microsoft Excel Workbook in the Items pane, and click OK. -
Name the workbook EditDept_LOV_src.xlsx
The published version of the workbook must have a different name from that of the source file. It is a good idea to establish a standard naming convention to differentiate between the source and published workbooks.
For example you might add the suffix _src to the name of the source file - EditDept_LOV_src.xlsx as here, and retain the more meaningful name for the published workbook - EditDept_LOV.xlsx.
Click OK.
-
By default Excel opens and loads Oracle ADF Desktop Integration. In the Page Definition dialog, select the ADFdi_view_EditTable_LOVPageDef page definition.
Then click OK.
-
The new workbook appears in the Application window..
You start adding content to it in the steps that follow. -
Go back in the Excel workbook. The Oracle ADF Desktop Integration 12c task pane appears presenting the available bindings from the page definition.
-
Select a cell in the worksheet, notice click the Oracle ADF tab option. This option allows you to work with ADF and your Excel book.
-
In the Oracle ADF Desktop Integration 12c pane, click the Insert Binding button...
... and in the Select Component dialog select ADF Table and click OK.
-
In the Insert Component: ADF Table dialog, click OK to accept default values.
-
The Excel worksheet displays. Your worksheet should look like the image below.It displays the bindings for each cell that the project uses.
-
Click the Save icon
to save the worksheet.
-
Back in JDeveloper, Save all your work and then double-click the ViewController project to invoke the Project Properties dialog.
Select the Java EE Application node and check that the fields, Java EE Web Application Name and Java EE Web Context Root, are both set to ADFdi_BC.
These values will be used by the integrated Oracle WebLogic Server.Click OK.
-
Return to Excel and click the Workbook Properties link in the Oracle ADF Desktop Integration 12c pane.
-
In the Edit Workbook Properties, next to the WebAppRoot field, enter http://127.0.0.1:7101/ADFdi_BC. This URL represents the URL of the Fusion Web application with which the workbook is integrated. Click OK.
-
Click the Oracle ADF tab in the Excel ribbon, and then select the Worksheet Properties menu item.
-
Click the Events field, and then click the more button
.
-
In the Edit Events dialog, click the Add button to add a Startup event.
-
Expand the ActionSet node and click the more button
next to the Actions field to open an Edit Actions dialog.
-
In the Edit Actions dialog, click the Add button and select ComponentAction from the drop down list.
-
Click the more button
next to the Action field.
-
In the select Choose Component Action dialog, select Download. (Notice that the Table ID, ROT1709241693 will be different in your case).
Click OK. -
In the Edit Actions dialog, in the Design | Annotation field, type Download Data.
-
You have finished the design of this simple Desktop Integration-enabled worksheet. In the next step you will test it.
You define a separate page definition file for each Excel worksheet that you want to integrate with a Fusion Web application. The Page Definition dialog lists all available page definition files in the application. In this tutorial there are just two page definition files that were already created in the startup application.
To view the data bindings in the ADFdi_view_EditTable_LOVPageDef page definition right-click EditTable_LOV.jspx in the Applications window and select Go to Page Definition from context.

In this step you have added a Startup event, and in the steps that follow you go on to define the action set that the event should invoke i.e. what the worksheet should do when the Startup event occurs.
The ADF Read-only Table component exposes only one component action, Download, while the ADF Table component exposes a number of other actions. In this part of the tutorial you added a read-only table to the worksheet, and so this is why Download is the only component action offered as available by the Choose Component Action dialog.
The Download component action causes the table to be automatically downloaded to the worksheet when the Startup event is triggered.
Comments you enter in the field have no effect on the behavior of the worksheet. They are the equivalent of code comments.
Click OK. Back in the Edit Events, click OK, and back in the Edit Worksheet Properties dialog, click OK.
-
In JDeveloper right-click the EditTable_LOV.jspx node and select Run from the context menu. (This step may take a while if Oracle WebLogic Server has not yet been set up on this computer.)
Typing a weblogic password.
The first time you run a page after a fresh install of JDeveloper, you will be required to type a Password for Oracle WebLogic Server. Enter a value of your choice for the password and click OK.
-
The EditDept_LOV loads, displaying department information.
-
Now that the page has been deployed in the Oracle WebLogic Server, you can run the Excel workbook. If not open already, in the Applications window double-click EditTable_LOV.xlsx to open Microsoft Excel.
-
The workbook loads. Click the Oracle ADF tab in the Excel ribbon.
-
In the Test group, click the Validate button
for validating the workbook. Click Close on positive validation.
-
Click Run
to start loading data.
-
The list of departments is returned in the worksheet.
-
Adjust the columns widths to achieve the desired look.
-
Click the Stop button in the Test group of the Oracle ADF tab in the Excel ribbon.
-
Close the Excel applicationwithout saving. You've successfully created a basic Excel workbook that is integrated with a Fusion Web application, and that automatically downloads data from a database table.

