The PageBrowser applet tag is the meat of the PageBrowser
System.
The parameters in the tag tell the PageBrowser what frames you are
using, how many pages there are, and what to put in each
Excerpt from "pagebrowser.html":
<APPLET CODE = "ca.ucalgary.phas.map.contentNavigator.PageBrowser.class" CODEBASE = "../../../classes" ARCHIVE = "ucalgaryjars/page_browser.jar,ucalgaryjars/utilities.jar" WIDTH = "500" HEIGHT = "25" > <PARAM NAME = "VERBOSE" VALUE = "false"> <PARAM NAME = "PAGE_COUNT" VALUE = "7"> <PARAM NAME = "FRAME_COUNT" VALUE = "3"> <PARAM NAME = "URL_BASE_RELATIVE_TO_DOC" VALUE = "true"> <PARAM NAME = "URL_BASE_RELATIVE_TO_CODE" VALUE = "false"> <PARAM NAME = "URL_BASE" VALUE = ""> <PARAM NAME = "LOAD_FIRST_PAGE_ON_INIT" VALUE = "true"> <PARAM NAME = "FRAME_NAMES" VALUE = "MAIN,RIGHT_SIDE,LEFT_SIDE"> <PARAM NAME = "FRAME_PAUSE_POLICY" VALUE = "true,false,false"> <PARAM NAME = "MAIN_FRAME_URLS" VALUE = "frameset.html,frameset.html,page3.html,frameset.html,frameset.html,page6.html,frameset.html"> <PARAM NAME = "LEFT_SIDE_FRAME_URLS" VALUE = "applet.html,pic2.html,null,pic4.html,applet.html,null,applet.html"> <PARAM NAME = "LEFT_SIDE_FRAME_APPLET_NAMES" VALUE = "pb_test_applet,null,null,null,pb_test_applet,null,pb_test_applet"> <PARAM NAME = "LEFT_SIDE_FRAME_APPLET_COMMANDS" VALUE = "Page1,null,null,null,Page5,null,Page7"> <PARAM NAME = "RIGHT_SIDE_FRAME_URLS" VALUE = "page1.html,page2.html,null,page4.html,page5.html,null,page7.html"> <PARAM NAME = "PAGE_LIST_VISIBLE" VALUE = "true"> <PARAM NAME = "PAGE_LIST_ENABLED" VALUE = "true"> <PARAM NAME = "PAGE_COUNTER_VISIBLE" VALUE = "false"> <PARAM NAME = "PREV_BUTTON_VISIBLE" VALUE = "true"> <PARAM NAME = "NEXT_BUTTON_VISIBLE" VALUE = "true"> <PARAM NAME = "RESET_BUTTON_VISIBLE" VALUE = "true"> </APPLET>
The simplest way to build your own pagebrowser.html is obviously to copy the one in this example and edit it to your liking. The parameters are described below.
VERBOSE
When this parameter is set to "true", a whole bunch of debugging
information will be output in the java console.
PAGE_COUNT
This is the number of pages in the content item. In this example,
there are 7 pages.
FRAME_COUNT
This is the number of frames in the content item. In this example
one frame is shown on some pages, and two on other pages. So
there are 3 frames in total.
URL_BASE_RELATIVE_TO_DOC,URL_BASE_RELATIVE_TO_CODE
These boolean parametere determine where the PageBrowser loads the
URLs relative to. Most of the time the URLs will be relative to the
document (as they are in this example).
URL_BASE
This string is put in front of all the URLs. This parameter is
useful if your pages are in a different directory from the
"pagebrowser.html" file.
LOAD_FIRST_PAGE_ON_INIT
This boolean parameter determines whether or not the PageBrowser
loads the first page when it starts up. The designer must decide if
he wants to load this page himself or have the pagebrowser do
it.
In this example, the PageBrowser is asked to load the first
page. This is because the frameset is initially loaded with empty
white pages as explained on Page 2 of this example.
FRAME_NAMES
The PageBrowser needs to know the names of your frames. The names
are described by the FRAME_NAMES parameter. This parameter is a
string of names, separated by commas. The names must match the
names of the frames in your frameset.
The order is important in this list. The system deals with the
frames in the order they are given in this list. This means that if
your content item has a multi-layered frameset as in our example
(the MAIN frame contains the other frames), the parent frame must
come before it's children in FRAME_NAMES. The reason for this is
that the MAIN frame must be loaded in order for LEFT_SIDE and
RIGHT_SIDE to exist.
FRAME_PAUSE_POLICY
This parameter is a comma delimited list of booleans. There must be
as many booleans in this list as there are frame names in
FRAME_NAMES.
When the PageBrowser loads the frames for a page, it is possible
for a frame the be in a previously loaded file. If this happens,
the browser will not find the frame if the file is not quite loaded
yet. When the PageBrowser finds a "true" in this parameter, it
pauses after the loading of that frame, allowing the browser time
to load the file.
In this example, the MAIN frame contains the frameset that contains
LEFT_SIDE and RIGHT_SIDE. So the pause policy for MAIN is
"true". LEFT_SIDE and RIGHT_SIDE need not be paused after, so their
policies are "false".
*_FRAME_URLS
For each frame, the PageBrowser needs to know what URLs to display
on it's pages. This is done through the *_FRAME_URLS
parameter. There has to be one of these parameters for each of the
frames named in FRAME_NAMES. The * is replaced by the name of the
frame.
In this example, there is a MAIN_FRAME_URLS parameter, a
LEFT_SIDE_FRAME_URLS parameter, and a RIGHT_SIDE_FRAME_URLS
parameter.
On pages where a frame does not need anything loaded into it, the
URL should be null. In this example, on page 3 and 6 the MAIN frame
is the only one displayed, and the other frames have "null" as their
URLs.
*_FRAME_APPLET_NAMES
The PageBrowser can also control and be controlled by applets in
it's frames. These applets are named in the *_FRAME_APPLET_NAMES
parameter. If there are no applets in a frame on any page, this
parameter can be omitted for that frame. If there is no applet on a
certain page in a frame, the applet name can be set to "null".
An applet can be controlled by the PageBrowser through a
PageBrowserAdapter. The applet can also force the PageBrowser to do
certain things through a PageBrowserAdapter. See the Javadocs for
PageBrowserAdapter and PageBrowserListener for more information.
*_FRAME_APPLET_COMMANDS
When there is an applet in frame/page in the *_FRAME_APPLET_NAMES
parameter, there must be a command in the same frame/page place in
the *_FRAME_APPLET_COMMANDS parameter. This string is the string
that is sent to the doCommand(java.lang.String) method of
PageBrowserListener when the PageBrowser loads the frame/page.
When there is no applet on a frame/page, the string "null" is
used. If there is no applet on any page in a frame, that frame's
*_FRAME_APPLET_COMMAND parameter can be omitted just like the
*_FRAME_APPLET_NAMES parameter.
Note that in this example there is no MAIN_FRAME_APPLET_NAMES,
MAIN_FRAME_APPLET_COMMANDS, RIGHT_SIDE_FRAME_APPLET_NAMES nor
RIGHT_SIDE_FRAME_APPLET_COMMANDS parameters. This is because there
are only applets loaded in the LEFT_SIDE frame.
PAGE_LIST_VISIBLE
This boolean parameter determines whether or not the Page List is
shown on the PageBrowser.
PAGE_LIST_ENABLED
This boolean parameter determines whether or not the Page List is
enabled when the PageBrowser starts up.
PAGE_COUNTER_VISIBLE
This boolean parameter determines whether or not the Page Counter is
shown on the PageBrowser.
PREV_BUTTON_VISIBLE
This boolean parameter determines whether or not the Previous Page Button is
shown on the PageBrowser.
NEXT_BUTTON_VISIBLE
This boolean parameter determines whether or not the Next Page Buttonis
shown on the PageBrowser.
RESET_BUTTON_VISIBLE
This boolean parameter determines whether or not the Reset Button is
shown on the PageBrowser.