Implementing Sequential Navigation
Our docbase records now provide one answer to âWhere can I go
from here?ââyou can go to any of the tabbed indexes. But
they donât say anything about âWhere am I?â beyond
the plain facts evident in the records themselves. Thereâs no
notion of sequence. Itâs true that you can get to the next or
previous record in the company
index by way of its
tabbed-index page. That is, you can go to the
company
tabbed-index page for the current record,
then select its predecessor or successor. But thatâs far more
cumbersome than the sequential controls we saw in Figure 7.1. There, another answer to âWhere am
I?â is âIn the company (or analyst, or product...)
index.â And another answer to âWhere can I go from
here?â is âTo the next (or previous) company (or analyst,
or product...).â
Whatâs
needed, then, is a way to map from a record number to its predecessor
or successor, relative to any of the indexes. The first step was to
save the sequences of record numbers that were only implicit in the
structures we built for the tabbed-index controls. We accomplished
that in _enumerateRecords( )
, which, as we saw
in Example 7.8, walks the tab structures and builds
a new structure with ordered lists of record numbers for each index.
These ordered lists are necessary, but not sufficient, for the sequential controls. For each record, we need the record number of its predecessor (if any) and its successor (if any), relative to each ...
Get Practical Internet Groupware now with the O’Reilly learning platform.
O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.