The objective of this session is to add an "Export" feature to the simple browsing application.
Users may want to export the content of a presentation to flat files or CSV files, which can then be imported into spreadsheet applications such as Microsoft Excel. You can add this functionality to the simple application easily by using predefined, custom BI Beans JSP tags.
The "Export" page contains an export dialog box that allows users to define export options.
exportJSP.jsp
as the filename.app
and
the same connection configuration file /Project1BIConfig1.xml
.<%--
Insert your Business Intelligence tags here --%>
comment.In the ExportOptions wizard, you can define the attribute values for the ExportOptions tag.
export.
In the Code Editor, you can see the code that was generated for the ExportOptions tag. The following code creates the export tag:
<orabi:ExportOptions id="export" />
The following code displays the export dialog box:
<orabi:Render targetId="export" parentForm="BIForm" />
<%-- The InsertHiddenFields tag adds state fields to the parent
form tag --%>
comment.In the Code Editor, you can see the code that was generated for the ApplyButton. The following code creates an apply button for exporting:
<orabi:ApplyButton id="exportJSP_ApplyButton1" dialogId="export" />
The following code displays the apply button:
<orabi:Render targetId="exportJSP_ApplyButton1" parentForm="BIForm"
/>
<%-- The InsertHiddenFields tag adds state fields to the parent
form tag --%>
comment.In the Code Editor, you can see the code that was generated for the CancelButton tag. The following code creates an apply button for canceling:
<orabi:CancelButton id="exportJSP_CancelButton1" dialogId="export"
/>
The following code displays the cancel button:
<orabi:Render targetId="exportJSP_CancelButton1" parentForm="BIForm"
/>
From the File menu, choose Save All to save the JSP application.
Finally, you will add an "Export" button to the viewer page so that users can access the "Export" page to export the presentation.
<%-- The InsertHiddenFields tag adds state fields to the parent
form tag --%>
comment.In the DialogLink wizard, you can define the attribute values for the DialogLink tag.
exportDialogLink.
Export
.In the Code Editor, you can see the code that was generated for the DialogLink tag. The following code creates a button for linking to the "Export" page:
<orabi:DialogLink id="exportDialogLink" presentationId="viewer" targetToolId="export"
targetPage="exportJSP.jsp" text="Export" />
The following code displays the linking button:
<orabi:Render targetId="exportDialogLink" parentForm="BIForm" />
From the File menu, choose Save All to save the JSP application.
You have created a simple application that allows users to export the contents of an open presentation.
You have added the "Export" feature to a simple application easily without writing a single line of code.
6. Adding "Save" Functionality | Overview | 8. Adding "Print" Functionality