![]() ![]() |
|
Open Client Developer's Guide | |
Search | Index | Glossary | | |
![]() |
|
![]() |
![]() |
![]() |
Customizing the Java ViewerThe Java Viewer is primarily used to view objects stored in Image Services libraries, such as faxes (.TIF) and various graphic format files including .JPG and .BMP. The Java Viewer is incorporated into the Open Client window as an embedded object and is created using JavaScript. The JavaScript application interfaces that support the Java Viewer are available in the Open Client toolkit in the ..\FileNet\IDM\Web\FnOpenClient\FnJavaV1files\ directory. The following sections describe the customizable behavior of the Java Viewer:
Detecting the Platform and BrowserWhile the IDM Viewer only supports the Microsoft Internet Explorer Web browser on Microsoft Windows type operating systems, the Java Viewer supports these configurations, as well as the Netscape Navigator browser on Mac/OS2 platforms. Open Client determines the operating system and Web browser being used by the client and enables the appropriate viewer toolbar buttons. Downloading the Viewer SoftwareWhen the user clicks the IDM Viewer toolbar button, Open Client determines if the IDM Viewer software has been downloaded to the client. If not, then the user is provided with the option of downloading the software from the server. After the IDM Viewer software has been downloaded, all clients, including the Open Client must be restarted by the user. Conversely, when the user clicks the Java Viewer toolbar button, the Java Viewer software is automatically downloaded from the server and a restart is not required. In addition, the Java Viewer software can be permanently loaded onto the client machine by copying the .cab file that comes with the Java Viewer into the \Winnt\java\classes folder. However, in bypassing the automatic download process, future enhancements to the Java Viewer software must be manually downloaded to the client from the Web server. Configuring the ViewerTo view a document in the Java Viewer, the user clicks a toolbar button that launches a new window containing the embedded Java Viewer object. During the instantiation process, HTML parameter values are used to configure the view preferences for the window. In the Open Client .NET environment, these HTML parameter values are links to a code-behind file that enables developers to implement VB-style programming to pass the HTML values to the Java Viewer. Depending on the Web application requirements, some parameter values may be passed dynamically to the viewer, while other values may be hard-coded to prevent further customization. For a list of the HTML parameters that may be modified to customize the Java Viewer, see Customizable HTML Parameters. Interacting with IDM Web ServicesIn some situations, the Java Viewer makes calls to IDM Web Services implemented in Open Client, such as saving and retrieving annotations or obtaining security attributes. The URLs that connect to Web services are specified as HTML parameters that are eventually passed to the Java Viewer. These URLs are created in the FnJavaView.aspx.vb file. The Java Viewer uses these URLs to make calls back to the Web services on the Web server. The Web services in turn are linked to lower level libraries that retrieve the requested data. Example: Retrieving Annotation DataThe following example demonstrates the interaction that occurs between the Java Viewer, Open Client, and IDM Web Services when retrieving annotation data. To obtain annotation data, add the following JavaScript code segment to the FnJavaViewHelper.js file: strDocWrite+='<param name="annotationFile" value="' + daejaAnnotationURL + '">'; The parameter specification results in a call to the
The Java Viewer passes the URL to the appropriate Web service on the Web server, using the following Open Client interface. Notice that the parameters specified in the URL match the variables defined in the interface header:
The Web service then returns a "string" of annotation data
in a text-based INI format. For an example of data converted to this format,
see XML Schema Converted to INI Format. Determining Whether a Document is ViewableCompared with the IDM Viewer, the Java Viewer currently only supports a limited number of file types, including .TIF, .JPEG, and .BMP. In addition, the system administrator can configure the site preferences to restrict the file types that may be rendered in the Java Viewer. The file FnToolBarData.vb contains functionality that determines if a requested document resides in an IS or CS library, and whether the document file type is supported and enabled for viewing. Open Client determines the viewable conditions for the requested document and then enables the appropriate viewer toolbar button(s). Formatting AnnotationsAnnotation data is communicated to and from IDM servers using XML Schemas. However, in order for this data to be readable by the Java Viewer, it must be converted into a text-based INI format through the use of an XSL transformer. The XSL transformer is located at ..\FileNet\IDM\Web\FnOpenClient\XML\annot.xsl. The IDM Desktop and Web Services API Toolkit Help includes documentation that describe the acceptable interface format of annotation data: Property List for Annotation Objects, Annotation Properties by ClassDescription, and AnnotationClass Constants. Note: In previous releases of Open Client, the Java Viewer required approximately .1 second per annotation longer than the IDM Viewer to convert an annotation into an acceptable format, depending upon the annotation type. Performance enhancements in Open Client 3.3 have improved the Java Viewer conversion time to be equivalent to that of the IDM Viewer. For an example of an annotation XML Schema converted into an acceptable INI format, see XML Schema Converted to INI Format. Retrieving a DocumentThe IDM Viewer and the Java Viewer use the same methodology to retrieve documents. A URL to an aspx page is passed to the Java Viewer, which contains information on where to make the call to retrieve the document. The Java Viewer then requests the document and renders it appropriately. |
![]() |
|