Chapter 11. Adding custom functions to the search results window 241
The following are some examples of custom actions you can create within the
drop-down combo box:
򐂰 Perform an automatic update of document attributes
For example, you can implement the Approve documents option that sets a
document attribute status to Approved and set the ApprovedBy attribute to the
current user. The updates can occur in the back-end datastore or on another
򐂰 Look up data from an external system
You can implement a Get billing summary option that gets an attribute from
the selected document (such as customer number and policy number),
queries an external database for an account summary, and displays the text
output in a new window.
򐂰 Perform an operation on the document object
You can implement a Convert to text option that performs full-text OCR of a
TIFF file on the fly and displays the text in a new window.
򐂰 Perform automatic foldering or routing
You can implement a Review document function that automatically places a
document in a specific folder, or starts it in a specific workflow.
򐂰 Perform automatic export of the document object and attribute data
You can automatically export the document object and attribute data to a
server directory. This prepares the selected documents to be written to a CD
or imported to another system.
The examples in this chapter provide a framework for implementing a variety of
custom functions. Two of the examples (export and view with plug-in) open a new
browser window for each selected document. The third example opens a single
window that allows a user to specify options for the custom action and then
perform custom processing for each selected document.
11.2 Adding custom entries to combo box
There are two JSPs that need to be modified to add a custom function to the
search results combo box: IDMSearchToolbar.jsp and heading.jsp. In addition,
you probably need to create a new JSP and/or servlet to perform the custom
processing on the selected items. The sample code provided does all of the
processing in JSPs and does not use custom servlets.
IDMSearchToolbar.jsp is in the eclient82.war directory in WebSphere as shown
in Figure 11-2 on page 242. Note that the heading.jsp is in the pageComponents
subdirectory below the rest of the eClient JSPs.
242 eClient 101 Customization and Integration
Figure 11-2 eClient source code location
IDMSearchToolbar.jsp contains the code that generates the list of items in the
combo box. It also contains the JavaScript function doSelected(), which is
executed when a user selects an item in the combo box. The doSelected()
function calls the appropriate JavaScript function in heading.jsp (one for each
action) to determine which documents are selected, and then performs the
selected action. The examples later in this chapter show you how to make these
The sample code shows you how to do two types of processing. In one case, a
new browser window is opened for each document. The XYZ export document
and XYZ view document with plug-in work this way. The other type of processing
opens a single JSP window that can perform an action on all of the selected
items. For example, it can add all of the items to a folder, update an attribute in
each document, or do whatever custom function you need using Java or the Java
Note that these examples are created to show concepts. They are not
extensively tested or intended to be used in production as-is.

Get eClient 101 Customization and Integration 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.