O'Reilly logo

Practical Internet Groupware by Jon Udell

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 index. While we’re at it, let’s capture ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required