Example: Book Catalog

This example demonstrates use of QuestAgent's "Search by Field" applet. Lookup for things such are "java", "advanced", etc.

 


HTML Code used to load QuestAgent applet:

<APPLET
 CODE     = "com.jobjects.quest.FieldedSearchApplet.class"
 ARCHIVE  = "qagent.zip"
 NAME     = "SearchApplet"
 WIDTH    = 600 
 HEIGHT   = 360
>
<PARAM NAME="CABBASE" VALUE="qagent.cab">

<PARAM NAME="ParamFile" VALUE="book.prm">

</APPLET>

book.prm file content (applet settings):

#
# Configuration parameters for JObjects QuestAgent applet
#

# Basic parameters...

# Set location to index database, document collection description
# and relative path to documents.
IndexFile1=data/index.que
IndexDescription1=Java Books
Prefix1=javabook/

# Custom settings...

# Use layout 2 (message line above the hit list.)
layout=2

# Show documents in frame named "docframe".
target=docframe

# Set size for external window. Not used in this example.
geom.frame.width=600
geom.frame.height=360

# Set background color to white.
geom.main_panel.bgcolor=white

# Define visible columns.
collection1.column_order=relevance,title,author,pages,price,publisher

# Define column titles (will be shown in list header).
collection1.column.relevance.desc=Rel.
collection1.column.title.desc=Title
collection1.column.author.desc=Author
collection1.column.pages.desc=Pages
collection1.column.price.desc=Price
collection1.column.publisher.desc=Publisher

# Define searchable fields and appropriate descriptions.
collection1.field_order=body,author,publisher
collection1.field.body.desc=Description
collection1.field.author.desc=Author
collection1.field.publisher.desc=Publisher

# Define column widths for "title" and "author" data.
# Other columns will be resized automatically.
collection1.column.title.width=220
collection1.column.author.width=190

# Set right alignment for "relevance" column and numerical sorting.
collection1.column.relevance.align=right
collection1.column.relevance.type=numeric

# Set appearance for "price" column and numerical sorting.
collection1.column.price.color=red
collection1.column.price.align=right
collection1.column.price.font=Serif
collection1.column.price.type=numeric

# Set right alignment for "pages" column and numerical sorting.
collection1.column.pages.align=right
collection1.column.pages.type=numeric

# Set list background color to light gray.
geom.list.bgcolor=lightGray

# Define list header appearance
geom.listheader.bgcolor=orange
geom.listheader.color=blue
geom.listheader.font=Serif

# Make description field visible.
collection1.description.visible=true