About page navigation
One of the
major tasks when creating a set of Web pages is managing how one
page links to another and how data is passed from one page to the next.
Navigation styles
You can link
from one page to another using any of three navigation styles:
- A hyperlink using the HTML <A> element
- A form submit for the page
- A server redirection using self-navigation (where
the form representing the current page submits back to itself)
All three styles let you bind parameters to target pages,
but the level of support for binding varies. Which navigation style
you choose depends on how you want data passed, whether or not the
data requires processing by the server, and the flexibility you
need. Most 4GL Web pages navigate to other pages by server redirection,
which provides the most flexible way to navigate from one page to
another. Server redirection can also be used to navigate from non-4GL
pages, but more coding is required. Table 10-1 next shows the advantages and disadvantages
of the three navigation styles.
| Navigation | Advantages | Disadvantages |
|---|---|---|
| Hyperlink |
|
|
| Form submit |
|
|
| Server redirect |
|
|
Target pages
When
you develop Web pages, you can specify a target page that already
exists, or one that you plan to create. If you specify a page that
already exists, you can bind values from the linking page to the
parameters of the target page. If you specify a page that does not
yet exist, you can set parameters on the linking page; then, when
you create the target page, you specify which parameters it requires
of those being passed from the linking page. For more information about
page parameters, see “Setting up page parameters”.
Parameter binding
When you establish
navigation from one page to another, you can bind values from the
linking page to parameters on the target page. 4GL Web pages support several
types of parameter bindings:
| Type of binding | Description | Navigation style restrictions |
|---|---|---|
| Constant | A fixed value | Not available for form submit. |
| Page Variable | A variable whose value is set on the server | Only initial value used by hyperlink (cannot be changed by client). Variable name must match parameter name on target page for form submit. |
| Page Parameter | A parameter whose value is set on the server |
Only initial value used by hyperlink (cannot be changed by client). Parameter name must match parameter name on target page for form submit. |
| Expression | The value of an expression set on the server |
Not available for form submit. |
| Control | The value property of a server object | Not available for hyperlink. |
The user interface for binding parameters is different for
each navigation style:
| Navigation style | For information, see |
|---|---|
| Hyperlink | “Managing client hyperlinks” |
| Form submit | “Managing client form submission” |
| Server redirect | “Managing server redirection” |