Integrating the Thin Clients with Your Web Application

This topic provides optional instructions for creating and customizing Cypress Web pages for the thin clients. These instructions are intended for previous users of the Cypress ActiveX Controls.

How to Use Cypress Thin Client Samples

Cypress provides several HTML samples that make it easy for you to create and customize your Cypress Web pages.

To access the Cypress thin client samples

  1. Deploy the Cypress thin client to a Web server.
  2. Deploy the Cypress thin client sample to the same Web server where the Cypress thin client resides.
  3. Make sure the Cypress thin client works as expected.
  4. Revise this sample URL for your site:

http://IP: port (for example: 127.0.0.1:8080) /CypressClientSamples/CypressWeb/Cypress.htm

  1. Launch the Cypress thin client samples.

Adding Cypress Web Code to HTML Pages

The simplest way to incorporate Cypress Web into HTML pages is by the use of frames. This approach requires three pages in a frameset:

A header frame that contains a corporate banner, links to other pages, and any code that may be required to perform a DocuVault Query.

<html>

<title>Full Text Query</title>

<BODY BACKGROUND="Query_header_frame.jpg" BGCOLOR="FFFFFF">

<br>

<div align="center">

<font face="Arial" color="white">

<form name="queryform" onsubmit="return queryform_onsubmit()" language="JavaScript">

<br><br><br><br>Search For:

<input type="text" name="full_text">

<input type=radio name="radio" checked>match any word

<input type=radio name="radio">match all words

<input type="button" value="Search" onClick="submit_query()" language="JavaScript">

<input type="reset" value="Clear Search">

</form>

</font>

</div>

 

<script language="JavaScript">

function submit_query()

{

var query_crit;

 

if (document.queryform.radio[0].checked)

{

query_crit="[word]=any_word(\""+document.queryform.full_text.value+"\")";

parent.frames[1].CypressQuery.DoQuery(query_crit);

}

else

{

query_crit="[word]=all_word(\""+document.queryform.full_text.value+"\")";

parent.frames[1].CypressQuery.DoQuery(query_crit);

}

}

 

function queryform_onsubmit()

{

submit_query();

return(false);

}

</script>

</body>

</html>

A viewer frame (e.g., Query_Viewer_frame.htm) that has a URL to point to the appropriate thin client.

<HTML>

<HEAD>

 

<META HTTP-EQUIV="Pragma" CONTENT="no-cache">

<META HTTP-EQUIV="Expires" CONTENT="-1">

<TITLE>Cypress Web Query Interface</TITLE>

<META HTTP-EQUIV="Pragma" CONTENT="no-cache">

<meta http-equiv="REFRESH" content="0;url=/DocumentViewer/Query.html"></HEAD>

</HEAD>

 

<BODY LEFTMARGIN=0 TOPMARGIN=0>

</BODY>

</HTML>

A launch page a user can access to launch a specific Cypress Web function and references the header and viewer frames.

<HTML>

<title>ASG-Cypress Document Full Text Query</title>

<FRAMESET ROWS="140, *" FRAMEBORDER=1 FRAMESPACING=0>

<FRAME SRC="Query_header_frame.htm"

<FRAME SCROLLING="NO" SRC="..\..\Components\Query_Viewer_frame.htm">

</FRAMESET>

</HTML>

Launch pages are located in the function-specific subdirectories within the SampleHTML directory (such as Inbox or TextQuery). Each launch page is designed to launch a specific function. Header frames and header frame support images are also located in the function-specific subdirectories within the SampleHTML directory.

Viewer frames (and Query_Viewer_frame.htm) are located in the Components directory. Viewer frames have a URL that points to the thin client that resides in the same Web server.

Copying Code from the Sample Files

While you can copy and edit the sample files as you wish, you might prefer to copy the content from the Cypress.htm file in the CypressWeb directory and the viewer_frame.htm file in the Components directory.

Viewer_frame files: Use these files when creating the frames that will launch the Inbox Viewer or the DocuVault Query function.

Header_frame files: In some cases, the header file is nothing more than a reference to an image. The query-related header files, however, contain code you might find useful when you are learning to format user input into a valid Cypress thin client Application Program Interface (API). These are relatively simple scripts that you should be able to quickly regenerate.

Launch_page files: Launch page files only contain HTML only to reference the required frames and specify the height of the frame. It is unlikely that you will need to copy the contents of these files.

Creating Pages that Link to Cypress Web Pages

You will probably need to copy launch code from cypress.htm into pages that contain Inbox and query functions. The purpose of this code is to ensure that the appropriate controls are available at the client when Cypress Web pages are launched.

<MAP NAME="Objmap">

<AREA SHAPE=POLYGON COORDS="473,243,473,307,531,307,531,243" HREF="SampleHTML/TextQuery/Query_launch_page.htm" >

<AREA SHAPE=POLYGON COORDS="473,140,473,204,531,204,531,140" HREF="SampleHTML/Inbox/Inbox_launch_page.htm" >

<AREA SHAPE=POLYGON COORDS="473,345,473,409,531,409,531,345" HREF="SampleHTML/CreatorQuery/Creator_Query_launch_page.htm" >

</MAP>.

Creating Pages that Download the Thin Clients Automatically

Since the thin client is a Web application, it will automatically be downloaded by the browser as soon as it is referenced.

<HTML>

<HEAD>

 

<META HTTP-EQUIV="Pragma" CONTENT="no-cache">

<META HTTP-EQUIV="Expires" CONTENT="-1">

<TITLE>Cypress Web Query Interface</TITLE>

<META HTTP-EQUIV="Pragma" CONTENT="no-cache">

<meta http-equiv="REFRESH" content="0;url=/DocumentViewer/Query.html"></HEAD>

</HEAD>

 

<BODY LEFTMARGIN=0 TOPMARGIN=0>

</BODY>

</HTML>

Creating Inbox Thin Client Pages

Since the thin client is a Web application, you can use it without creating any pages. However, for backward compatibility, the thin client supports the same Application Program Interface (API) as the old ActiveX clients.

This section describes how to create Cypress Web pages that display Inbox contents using a backward compatibility API.

To create Cypress Web pages that display Inbox contents using a backward compatibility API

1. Create an HTML page that links to the thin client Inbox page.

<HTML>

<HEAD>

<script src = "is_header.js"> </script>

<META HTTP-EQUIV="Pragma" CONTENT="no-cache">

<META HTTP-EQUIV="Expires" CONTENT="-1">

<TITLE>Cypress Web Inbox Interface</TITLE>

<meta http-equiv="REFRESH" content="0;url=/DocumentViewer/Inbox.html"></HEAD>

<META HTTP-EQUIV="Pragma" CONTENT="no-cache">

</HEAD>

 

<BODY LEFTMARGIN=0 TOPMARGIN=0>

 

</BODY>

</HTML>

2. Use the thin client Inbox page to display the result.

Most Cypress Web page designers prefer to use one HTML frame as a container for company logos and other Web page “look and feel” considerations and a separate HTML frame as a container for the Cypress thin client Inbox page.

This example demonstrates how you can code the client page as two HTML frames. When taking this approach, you will need to include an HTML page that binds the two frames together, as shown:

<HTML>
<title>World Wide Enterprise Inboxes</title>
<FRAMESET ROWS="110, *" FRAMEBORDER="1">
<!-- Inbox_header_frame.htm builds the top part the frame with a nice -->
<!-- jpeg and text -->
<FRAME SRC="Inbox_header_frame.htm">

<!-- Inbox_viewer_frame.htm builds the bottom part with the Cypress
<!-- viewer component -->
<FRAME SRC="..\..\Components\Inbox_viewer_frame.htm" SCROLLING="NO">

</FRAMESET>

</HTML>

The top frame page (Inbox_header_frame.htm) provides for the display of a graphic image. You may customize it with logos and text of your choosing, as shown:

<html>
<title>Inbox</title>
<BODY BACKGROUND="Inbox_header_frame.jpg" BGCOLOR="FFFFFF">
<h1 align="center">
</h1>
</body>

</html>

Creating a Cypress Web Query Page

Since the thin client is a Web application, you can use it without creating any pages. However, for backward compatibility, the thin client supports the same API as the old ActiveX clients.

Cypress Web pages that query the DocuVault are easy to create. It is assumed that the Cypress Web page coder will have a full understanding of the Cypress index structures implanted in your environment and be familiar with Knowledge Builder in addition to HTML and a Web scripting language such as VBScript or JavaScript.

Each Cypress Web query page has these three parts:

An HTML Form that will submit the query
A script that will form the Cypress query and execute the Cypress thin client DoQuery method
The Cypress thin client query page that will display the results

These three parts can be coded all in one frame. However, most Cypress Web page designers prefer one HTML frame as a container for the HTML form and script and a separate HTML frame to contain the query object.

What follows is an example of coding the query page as two HTML frames. When taking this approach, it is necessary to have an HTML page that binds the two frames together. This is a sample of this type of page:

<HTML>
<title>Cypress Document Full Text Query</title>
<FRAMESET ROWS="140, *" FRAMEBORDER=1 FRAMESPACING=0>
<FRAME SRC="Query_header_frame.htm">
<FRAME SCROLLING="NO" SRC="..\..\Components\Query_Viewer_frame.htm">
</FRAMESET>

</HTML>

The top frame page (Query_header_frame.htm) contains the form to submit the query and the script that builds the Cypress query and executes the Cypress thin client DoQuery method. The sample code provided implements an HTML form that contains a text entry box, two radio buttons, and a submit button. When the submit button is clicked, JavaScript is run to create a Cypress query that will search the DocuVault using the Full Text index for the word or words entered in the form’s text box. Whether the search is for any word entered in the text box or all words entered in the text box is based upon which radio button has been selected.

<html>

<title>Full Text Query</title>

<BODY BACKGROUND="Query_header_frame.jpg" BGCOLOR="FFFFFF">

<br>

<div align="center">

<font face="Arial" color="white">

<form name="queryform" onsubmit="return queryform_onsubmit()" language="JavaScript">

<br><br><br><br>Search For:

<input type="text" name="full_text">

<input type=radio name="radio" checked>match any word

<input type=radio name="radio">match all words

<input type="button" value="Search" onClick="submit_query()" language="JavaScript">

<input type="reset" value="Clear Search">

</form>

</font>

</div>

 

<script language="JavaScript">

function submit_query()

{

var query_crit;

 

if (document.queryform.radio[0].checked)

{

query_crit="[word]=any_word(\""+document.queryform.full_text.value+"\")";

parent.frames[1].CypressQuery.DoQuery(query_crit);

}

else

{

query_crit="[word]=all_word(\""+document.queryform.full_text.value+"\")";

parent.frames[1].CypressQuery.DoQuery(query_crit);

}

}

 

function queryform_onsubmit()

{

submit_query();

return(false);

}

</script>

</body>

</html>

How to Use Thin Client APIs

This topic provides a list of thin client APIs. It also describes the DoQuery method for querying documents as well as ways to limit the query results and sort the retrieved documents.

List of Thin Client APIs

This table describes the methods that you can use when you implement the Cypress query object.

API Method

Description

Parameters

AddDocument

Adds a specified document in the list of displayed documents in the browsing tree.

AddDocument(docuVault, ddocId, documentTitle)

docuVault: DocuVault name.
ddocId: Document ddoc ID.
documentTitle: Title of the new document.

Returns true on success and false on failure.

ClearCurrPageIndex

Removes a specific index from the current displayed page.

ClearCurrPageIndex()

Returns true on success and false on failure.

ClearDocumentIndex

Removes the specified index from the current selected document.

ClearDocumentIndex (docuVault, ddocId, indexName, indexValue)

docuVault: DocuVault name.
ddocId: Document ddoc ID.
indexName: Index name.
indexValue: Index value.

Returns true on success and false on failure.

DeleteDocument

Deletes the current selected document from database and removes it from the browsing tree.

DeleteDocument(docuVault, ddocId)

docuVault: DocuVault name.
ddocId: Document ddoc ID.

Returns true on success and false on failure.

DeleteSelectedDocuments

Removes all checked documents from the database and the browsing tree.

DeleteSelectedDocuments()

Returns true on success and false on failure.

DeleteSelectedDTIC

Removes all selected DTICs from the display without removing them from the database.

DeleteSelectedDTIC()

Returns 0 on success and -1 on failure.

DoQuery

Performs a query by using the input criteria and displays the returned documents/pages in the browsing tree.

DoQuery(query_crit)

query_crit: Query criteria.

Returns true on success and false on failure.

GetActiveDocument

Gets the DocDbase and Docid of the current selected document.

GetActiveDocument()

Returns the object with two fields: DocuVault and id.

GetCurrPageIndexes

Gets the indexes for the current displayed page.

GetCurrPageIndexes()

Returns an array of objects with two fields: name and val.

GetCurrPageNum

Gets the current page number.

GetCurrPageNum()

Returns the page number.

GetDocumentIndexes

Gets indexes of the selected documents. Only user-defined document-level indexes are returned.

GetDocumentIndexes()

Returns an array of objects with two fields: name and val.

GetDocumentType

Gets the type (native doc, etc.) of the current selected document.

GetDocumentType()

Returns the document type mask on success and -1 on failure;

GetSelectedDocument

Gets the DocDbase and Docid of the selected document.

GetSelectedDocument ()

Returns an array of objects with two fields: DocuVault and id.

InvokeFax

Invokes the action by simulating clicking the Fax button.

InvokeFax ()

Returns 0 on success and -1 on failure.

InvokePrint

Invokes the action by simulating clicking the Print button.

InvokePrint()

Returns 0 on success and -1 on failure.

InvokeSendToInbox

Invokes the action by simulating clicking the Send to Inbox button.

InvokeSendToInbox ()

Returns 0 on success and -1 on failure.

JumpToPage

Goes to the specified page within the current document.

JumpToPage ()

NumDocumentsSelected

Returns the number of documents that are currently highlighted in the list view.

NumDocumentsSelected()

PropertyTabsDisplay

Sets whether to hide a property tab for certain property dialogs.

PropertyTabsDisplay(dialogClass, tabClass, displayStatus)

dialogClass: Class name of the dialog where tab located.
tabClass: Class name of the tab.
displayStatus: If displayStatus = 1, the tab will be shown; if displayStatus = 0, the tab will be hidden.

Returns 0 on success and -1 on failure.

RemoveCurrDocFromViewer

Remove the current selected document from the browsing tree.

RemoveCurrDocFromViewer()

RouteToDevice

Routes the current selected document to the specified device.

 

Returns 0 on success and -1 on failure.

RouteToInbox

Routes the current selected document to the specified inbox.

RouteToInbox(recipName, inboxName)

recipName: Name of the recipient.
inboxName: Name of the inbox.

Returns 0 on success and -1 on failure.

SetButtonState

Dynamically changes a toolbar button state.

SetButtonState (className, state)

className: Class name of the button.
State: Can be normal, active, and disabled.

Returns 0 on success and -1 on failure.

SetCurrPageIndexes

Sets the indexes for the current displayed page.

SetCurrPageIndexes(indexName, indexValue)

indexName: Index name.
indexValue: Index value.

Returns true on success and false on failure.

SetDocumentIndexes

Sets document-level indexes for the selected document.

SetDocumentIndexes(docuVault, ddocId, indexName, indexValue)

docuVault: DocuVault name.
ddocId: Document ddoc ID.
indexName: Index name.
indexValue: Index value.

Returns true on success and false on failure.

ShowButton

Dynamically shows or hides a toolbar button.

ShowButton(className, state)

className: Class name of the button.
State: If state = 1, the button will be shown; if state = 0, the button will be hidden.

Returns 0 on success and -1 on failure.

Example: the DoQuery Method

The DoQuery method enables you to run Cypress expression queries from your Query Viewer application. You can use prescripted expression queries or allow your end users to develop their own. Cypress returns results from the DoQuery method in the thin client Query Viewer page.

The documents that the DoQuery method will display are based upon three key items: the expression query passed, the end user’s security, and the properties defined for the CypressQuery object being used.

If you are using thin clients, you can call the DoQuery method with either of these methods:

You can put your JavaScript code directly in DocumentViewer/Query.html.
You can put code in a separate HTML file and use frames to call the DoQuery method.

To call the DoQuery method from the thin client API

> Add this line to your web-page code:

<path to CypressQuery object>.DoQuery(<expression criteria>)

where:

<expression criteria> is a valid Cypress expression query string.

<path to CypressQuery object> is the path to a CypressQuery object; for example:

CypressQuery object is in different frame:

<window.frames[<frame number where CypressQuery object is situated>].

CypressQuery.DoQuery(<expression criteria>)

CypressQuery object is in the same frame:

CypressQuery.DoQuery(<expression criteria>)

The web page code in these examples shows another way you can call the DoQuery method from a different frame:

MyWebPage.html:

 

<html>

<title>Cypress Document Creator Query</title>

<body>

<br>

<div align = "center">

<form name = "queryform">

<BR><BR><BR><BR>Search for documents with id greater than

<input type = "text" name = "document_id">

<input type = "button" value = "Submit Query" onClick = "submit_query()"

language = "JavaScript">

<input type = "reset" value = "Clear Query">

</form>

</div>

 

<script language = "JavaScript"> function submit_query()

{

var query_crit;

 

query_crit = "[Document Id] = " + "\"" +

document.queryform.document_id.value = "\"";parent.frames[0].CypressQuery.DoQuery(query_crit);

}

 

</script>

</body>

</html>

ApplicationWithFrames.html:

 

<html>

<head>

<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">

<title>Cypress Thin Client With Additional Form</title>

</head>

 

<frameset cols="80,20">

<frame src="/DocumentViewer/Query.html" name="mainFrame" id="mainFrame" scrolling="no" noresize>

<frame src=" MyWebPage.html" name="MyWebPage" id=" MyWebPage ">

</frameset>

 

</html>

where:

/DocumentViewer/Query.html is the path to the thin client query control.

MyWebPage.html is the path to your Web page.

More Thin Client API Usage Examples

This topic provides further examples of thin client API usage.

Calling a Function

This example calls a function without parameters and without retrieving a result:

<button onclick="CypressQuery.RemoveCurrDocFromViewer()">

Remove Current Doc From Viewer</button>

Retrieving Results

This example retrieves the result of the function:

<script type="text/javascript">

var result = CypressQuery.GetCurrPageIndexes(); //saving result to variable

alert(result); //displaying result

</script>

Passing Parameters to a Function

These examples pass parameters to a function.

Calling a Function from a Button Onclick Atrribute

This example calls a function from a button onclick attribute:

<div>

<input type="text" id="addDocuVault" value="NewDocuVault" />

<input type="text" id="addDocumentId" value="1" />

<input type="text" id="addDocumentTitle" value="new Document Title" />

<button name="AddDocument" onclick="CypressQuery.AddDocument( document.getElementById('addDocuVault').value,

parseInt(document.getElementById('addDocumentId').value),

document.getElementById('addDocumentTitle').value)">AddDocument

</button>

</div>

Calling a Function without an Onclick Atrribute

This example calls a function without an onclick attribute:

<div>

<input type="text" id="addDocuVault" value="NewDocuVault" />

<input type="text" id="addDocumentId" value="1" />

<input type="text" id="addDocumentTitle" value="new Document Title" />

<button id="addDocButton" name="AddDocument">AddDocument</button>

</div>

 

 

 

<script type="text/javascript">

 

function addDocumentButtonClick() {

var docuVault = document.getElementById('addDocuVault').value, //

documentId = parseInt(document.getElementById('addDocumentId').value),//retrieving input values

newDocumentTitle = document.getElementById('addDocumentTitle').value;//

CypressQuery.AddDocument(docuVault, documentId, newDocumentTitle); //passing parameters to function

}

 

document.getElementById("addDocButton").onclick = addDocumentButtonClick;

//invoking 'addDocumentButtonClick' function on button with 'addDocButton' id click

</script>

Invoking API Methods with VBScript

This example invokes API methods with VBScript:

<div>

<button name="button1">Get Current Page Number</button>

</div>

<script language="VBScript">

sub button1_onclick

Dim result

Set result = CypressQuery.GetCurrPageNum()

alert result

end sub

</script>

The range_incl Operator

This topic discusses the use of the range_incl operator.

Using Wildcards

Cypress is capable of doing a “begins with” wildcard search. An example of this type of search might be an end user who is looking for a specific serial number but knows only that it starts with XJ25 and could, therefore, search for XJ25*. Wildcard searches for information in the middle or end of a string are not allowed.

In order to perform a “begins with” wildcard search, you must use the range_incl operator. The range_incl operator includes the specified text in the query. For example, if you were searching for pages in a company name index that began with Bo, the code would need to search the range between Bo and BoZZZZZZZZZZZZZZZZZ including these two company names.

Wildcard searches of data indices use the available commands and syntax rules for expression queries; however, the wildcard portion of the search needs to be built by the submitting Web page. You must construct JavaScript or VBScript to perform these basic steps:

Strip out the wildcard character (usually an asterisk [*]).
Derive a low value string and a high value string.
Create a query that uses the range_incl operator.

For example, if a user wants to return all documents beginning with Bo, they will most likely enter Bo* in the search input field. Your code would take this string, remove the asterisk, derive the low end (Bo) and high end (BoZZZZZZZZZZZZZZZZZ) of the range, and insert these new values into a query using the range_incl operator.

This JavaScript code provides an abbreviated example of what your code will look like:

var low_value;
var high_value;
var query_string;
.
.
.
low_value=documentname.formname.fieldname.value.replace(“*”,””);
high_value=documentname.formname.fieldname.value.replace(“*”,”ZZZZZZZZZZZZ”);
.
.
.
query_string=”[CustomerName]=range_incl(“+”\””+low_value+”\””+”,”+”\””+high_value+”\””+”)”;
.
.

.

Wildcard Query Examples

Example 1

Business objective: You need to find information about a specific customer (Zellco Packing) but you are uncertain of the exact spelling of the customer’s name and know nothing else about the customer (e.g., document type, date range, or customer number).

You can submit this expression query:

[CustomerName] = range_incl("Z","Zzzzzzzzzzzzzzzzz")

This expression searches the data index CustomerName for names that begin with the letter z. This would commonly be designated as wildcard search criteria z*.

Example 2

Business objective: You need to find information about a specific company (Habanaroia Tusqe Inc.) but you are uncertain of the exact spelling of this company’s name and know nothing else about the customer (e.g., document type, date range, or customer number).

You can submit this expression query:

[CompanyName] = range_incl("hab","habzzzzzzzzzzzzzzzz")

This expression searches the data index CompanyName for names that begin with the string hab. This would commonly be designated as wildcard search criteria hab*.

Searching on Date Ranges

You will often need to query documents based on date ranges. To construct date range queries, you will use the time specification object and the range_incl operator.

Searches on date ranges use the available commands and syntax rules for expression queries; however, the date range portion of the search needs to be built by the submitting Cypress.Web page. You will need to construct JavaScript or VBScript to perform these basic steps:

Convert the dates entered by the user into a valid Cypress time specification
Create a query that uses the range_incl operator.

For example, if a user wants to return all documents from January 1, 2005 to January 31, 2005, they will most likely enter 01-01-2005 and 01-31-2005 in the search input fields. Your code would take these strings, convert them to time specifications, and insert these new values into a query using the range_incl operator. The JavaScript code shown provides an abbreviated example of what your code will look like:

var low_value_year;
var low_value_month;
var low_value_date;
var high_value_year;
var high_value_month
var high_value_date;
var high_time_spec;
var low_time_spec;
var query_string;
.
.
.
low_value_month=documentname.formname.fromfieldname.value.substr(0, 2);
low_value_date=documentname.formname.fromfieldname.value.substr(3, 2);
low_value_year=documentname.formname.fromfieldname.value.substr(6, 4);
low_time_spec=”tstamp(“+low_value_year+“,”+low_value_month+“,”+low_value_date+“)”;

high_value_month=documentname.formname.tofieldname.value.substr(0, 2);
high_value_date=documentname.formname.tofieldname.value.substr(3, 2);
high_value_year=documentname.formname.tofieldname.value.substr(6, 4);
high_time_spec=”tstamp(“+high_value_year+“,”+high_value_month+“,”+high_value_date+“)”;
.
.
.




query_string=”[ClosingDate]=range_incl(“+low_time_spec+”,”+high_time_spec+”)”;
.
.

.

Limiting Document Retrieval Based on Document Title

By default, when you perform a query, Cypress will retrieve all documents that match the search criteria and that match the end user security – regardless of duplicate titles.

However, it may be desirable to always have the most recent version of a document retrieved. You can use the TitleGen property to customize the number of documents of the same title displayed in the browser tree list of the Query Viewer.

The TitleGen property can be specified in the DocumentViewer.properties file.
For example:

cypress.titleGen=0

In addition, you can override the value specified in the DocumentViewer.properties file for both the TitleGen and ShowAllRecipients parameters when you start a session by adding these parameters and their values to the URL path. For example:

http://{host name}:8280/DocumentViewer/Inbox.html?
ShowAllRecipients=true&TitleGen=3

Or  

http://{host name}:8280/DocumentViewer/Query.html?
ShowAllRecipients=false&TitleGen=4

These parameters are contained in the session and are not saved to the database.

Customizing the Sort Order of Retrieved Documents

By default, Cypress sorts documents returned from a query by title and then by creation time. However, you can customize the order in which Cypress sorts retrieved documents using the DocSortingType property.

This table describes the document sorting type settings:

DocSortingType Setting

Effect

0 (default)

Sort by title, ascending

1

Sort by title, descending

The DocSortingType property can be specified in the DocumentViewer.properties file.

Limiting the Number of Returned Documents

It is sometimes desirable to limit the number of documents that may be returned to you by Cypress queries. This might be done to improve overall performance of the Cypress environment, or to enforce more granular query parameters to improve the locating of specific documents in the DocuVault.

To limit the number of documents returned by any query initiated in Query Viewer, set the QueryDocLimit property.

The QueryDocLimit property can be specified in the DocumentViewer.properties file. For example:

cypress.QueryDocLimit=100

This example limits the number of returned documents to 100. Should the limit be exceeded, a message will be displayed to the user indicating that too many documents were found.

Setting the maximum number of returned documents to zero (0) causes Cypress to use the default value specified in the Maximum Document Hits field on the View tab of the Administration Tools module’s Parameter tab.

Configuring a Predefined Query

Sometimes you may wish to have a particular document (or set of documents) automatically display with a single click rather than leaving it to the user to formulate their own queries. For example, you might want to display frequently accessed documents such as policies and procedures or weekly company newsletters at the click of an icon or hyperlink. The InitQuery property allows you to programmatically invoke queries as a Cypress.Web page is being launched.

Pages using the CypressQuery control in conjunction with this property can automatically launch all query results displayed within Query Viewer, eliminating the need for any user input related to the query. This property is designed for use with portal applications, corporate intranet logon pages, or any page where you wish to automatically display the results of a predefined query.

To specify the InitQuery property

1. Login to the Query thin client with your credentials.
2. Press the right mouse button at the tree area to open the context menu.
3. Click Options… in the context menu to open the Options dialog.
4. Click the Default tab in the Options dialog.
5. Specify the InitQuery property in the Initial Query field.
6. Click OK.

Additional Customization Tips

This topic provides additional tips to help you customize your thin clients.

Properties for the Inbox Viewer

You can specify these properties for the Inbox Viewer thin client:

Property

Description

Instructions

TreeBGColor

Specify the background color for the tree view.

Change the property background color of class TreeBGColor in the DocumentViewer.css file for the rich client and in the html-version.css file for the compliant version.

ListBGColor

Specify the background color for the list view.

Change the property background color of class ListBGColor in the DocumentViewer.css file for the rich client and in the html-version.css file for the compliant version.

DocBGColor

Specify the background color for the document view.

Change the property background color of class DocBGColor in the DocumentViewer.css file for the rich client and in the html-version.css file for the compliant version.

ColHdrCreator?

Specify text for the list view Creator column.

Change the text value of the ColHdrCreator? property in the language property files.

ColHdrCreated?

Specify text for the list view Created column.

Change the text value of the ColHdrCreated? property in the language property files.

ColHdrTitle?

Specify text for the list view Title column.

Change the text value of the ColHdrTitle? property in the language property files.

ColHdrSubject?

Specify text for the list view Subject column.

Change the text value of the ColHdrSubject? property in the language property files.

Examples

Hiding a Button

This example shows you how to hide the Logout button in both the Rich and HTML versions of the Inbox Viewer.

Rich Version

To hide a button

1. Open the MailViewerCustomization.css file, which is located in the war/css/ folder.
2. Find the button class name that you want to hide; for example:

.logOutButton {

 

}

3. Add {display: none;} within curly braces and save the file.

The MailViewerCustomization.css file will look like this example:

.logOutButton {

display: none;

}

HTML Version

To hide a button

1. Open the InboxViewerCustomization-html.css file, which is located in the war/css/ folder.
2. Find the button class name that you want to hide; for example:

.logOutButton {

 

}

3. Add {display: none;} within curly braces and save the file.

The InboxViewerCustomization-html.css file will look like this example:

.logOutButton {

display: none;

}

Adding a Custom Button

This example shows you how to add a button that says Hello World! when the user clicks on it.

To add a custom button

1. Open the customButtons.js file, which is located in the war/js/ folder.
2. Input the button parameters in this format:

var anyUniqueNameStartingOnLetter = {

name: "nameOfButton", //will be used as button's class for customization

title: "buttonTitle", //title and text of button

location: "printPanel", //to what panel button will be attached

onclick: "buttonAction()" //name of function that will be called after button clicking

};

 

buttons.push(anyUniqueNameStartingOnLetter); // adding our button to list of custom buttons

3. Implement the function that will be called after clicking on the button. In this case, the Hello World! dialog is displayed on the screen.

function buttonAction() {

alert("hello world!"); //Code invoked on button click

}

4. Save the file. The button will appear after refreshing the page.

Customization Areas

This topic provides screen samples that highlight the various areas that you can customize.

HTML Version

Inbox Viewer

Query Viewer