Process Engineer Toolkit > User's Guide > Tools Reference > Search Engine > Search Applet

SearchEngine: The Search Applet

It is strongly suggested that you use a relative path from the applet page for both the codebase attribute, and the path parameter.

You may also want to change the name of your database files. The search applet expects to find the database in a file which has the URL given by the database parameter, in the codebase directory, but with different extensions.

An example demonstrates these actions. The database for the search applet is constructed in a set of files:

search.html
search.ws

The original content of the search.html document is:

<title>Search Web applet</title>
<div align=center>
<applet codebase="." archive="Search.zip"
 code="ruptools.Search.class" width=600 height=200>
<param name=database value="search">
<!-- param name=path value="../" -->
<!-- param name=query value="Enter query: " -->
<!-- param name=results value="Results: (double click to view the document) " -->
<!-- param name=search value=" Search " -->
<!-- param name=empty value="No matching documents found" -->
<!-- param name=select value="Search by: " -->
<!-- param name=title value=" title " -->
<!-- param name=headings value=" headings " -->
<!-- param name=lists value=" lists " -->
<!-- param name=body value=" body " -->
<!-- param name=target value="add target frame/window here" -->
</applet>
</div>

Personalizing the applet

The applet interface consists of a series of labels, and input objects (text fields, lists, and selectors). All the labels, and result messages can be modified by simply specifying their value within the applet parameters. The labels have the following parameter names, and default values:

Name of the parameter Example value Description

searchfont
(optional)

Arial,PLAIN,12

Specifies the font used in the search applet. The default value is Helvetica,PLAIN,14.

query
(optional)

Enter query:

The text which appears to the left of the text input window. The default value is Enter query:.

results
(optional)

Results: (double click to view the document)

The text which appears above the results list box. The default value is Results: (double click to view the document).

search
(optional)

Search

The text which appears in the button to the right of the text input window. The default value is Search (double click to view the document).

empty
(optional)

No matching documents found

The text which appears in the results list box when no matching documents are found. The default value is No matching documents found.

select
(optional)

Search by:

The text which appears to the left of the tag selectors, below the text input window and above the results list box. The default value is Search by:.

title
(optional)

title

The title (<title>) type tags selector label name. The default value is title.

headings
(optional)

headings

The headings (<h1..h6> and <caption>) type tags selector label name. The default value is headings.

lists
(optional)

lists

The list (<li> and <dt>) type tags selector label name. The default value is lists.

body
(optional)

body

The remaining tags selector label name. The default value is body.

target
(optional)

The name of the browser window or frame, where requested documents are to be displayed.

helppage
(optional)

help.htm

The name of the helpfile relative to the codebase. The default value is help.htm.

helptarget
(optional)

_top

The html target in which the helppage is shown. If this parameter is not set the helppage will be shown in the current frame.

database

doc.ws

The name of the database file

wwwroot
(optional)

search

Defines where the pictures have their top directory. If this parameter is not defined wwwroot is set to the documentbase of the HTML document containing the applet tag. In most cases this parameter is not used.

path

../

The relative path to the top of the directory structure. This value of this parameter together with the value in the database will make an URL complete.

frame
(optional)

true

Specifies if the applet shall be opened in a separate window or in the current applet area. The default value is false.

framewidth
(optional)

250

Specifies the width of the separate window. The default value is 250.

frameheight
(optional)
(optional)

400

Specifies the height of the separate window. The default value is 400.

frametitle
(optional)

Search

Specifies the title of the separate window. The default value is Tree Browser.

frameimage
(optional)

images/icon.gif

You can choose to display a text, a image or both in the applet area. Specify the image relatively the documentbase, for example "images/icon.gif". If the image can not be loaded the text specified by the parameter framelabel will be shown.

framelabel
(optional)

Tree Browser

Specify the text to be shown in the applet area. The default value is Tree Browser.

labelpos
(optional)

below

If both the parameters frameimage and framelabel are specified this parameter specifies where the text shall be written according to the image. Possible values are "right" and "below". The default value is below.

framelabelfont
(optional)

Arial,BOLD,12

Specifies the font of the text specified by the parameter framelabel. The default value is Arial,BOLD,12.

framelabelbgcolor
(optional)

white

Specifies the background color of the applet. The default value is white.

loading1
(optional)

Loading database

The first part of the text which appears when the database is loading. The default value is Loading database.

loading2
(optional)

%...

The second part of the text which appears when the database is loading. The default value is %....

failedloading
(optional)

Failed to load database, thread interrupted

The text which appears if loading the database fails. The default value is Failed to load database, thread interrupted.

invaliddocumenturl
(optional)

Couldn't build the document URL

The text which appears if the url to a document contains syntax errors. The default value is Couldn't build the document URL.

invalidhelpurl
(optional)

Invalid help url!

The text which appears if the url to the help document contains syntax errors. The default value is Invalid help url!.

Copyright  © 1987 - 2001 Rational Software Corporation


Display Rational Unified Process using frames

Rational Unified Process