WebSpeed
Developer’s Guide
Formatting DISPLAY Output
In general, DISPLAY output is formatted using SpeedScript frames. These are not HTML frames, but are logical structures maintained by SpeedScript to manage its output. There are several types of SpeedScript frames you can use to stream output to the Web, and this output can be organized into still larger, multi-frame stream pages. Stream pages are not Web pages, but logical sections of a Web page containing one or more SpeedScript frames. For information on the available types of SpeedScript frames, see the Frame Phrase entry in the Progress Language Reference.
Keep in mind that these SpeedScript frames and the larger multi-frame stream pages are structures that WebSpeed uses to format a single Web page for a single request. They do not, in and of themselves, return as successive individual Web pages, such as appears for large result sets from a Web search engine. They merely provide a means to partition and give structure to a single Web page using DISPLAY and other SpeedScript statements.
NOTE: Stream paging applies both to DISPLAY and PUT ({&OUT}) statement output. However, only DISPLAY (and SQL SELECT) statements output SpeedScript frames.You can format DISPLAY statement output using two mechanisms:
Paging Options of the OUTPUT TO "WEB" Statement
The two paging options include:
To open an unnamed output stream with 25-line stream pages, you specify this:
Each stream page contains the following output ordered and organized into one to three sections, all within the number of lines specified for the stream page:
- Any content from activated SpeedScript PAGE-TOP frames for the current OUTPUT stream. Otherwise, the stream page begins with the second section.
- Any other DISPLAY or PUT statement output for the current OUTPUT stream. If DISPLAY output is for a SpeedScript DOWN frame, any column headers are printed in the following occurrences:
- At the start of an iteration block.
- At the start of the stream page or immediately after any output from PAGE-TOP frames.
If DISPLAY output is for a SpeedScript frame other than a DOWN frame, the entire content from the specified frame is output for each DISPLAY statement.
All output in the second part of the stream page continues until the line number required to start any activated PAGE-BOTTOM frame or after the last line of the stream page, which ever comes first. If PAGE-BOTTOM frame output is activated, the stream page continues with the third section. Otherwise, the stream page is complete.
- Any content from activated SpeedScript PAGE-BOTTOM frames for the current OUTPUT stream until the stream page is complete.
NOTE: Activate SpeedScript PAGE-TOP and PAGE-BOTTOM frames using DISPLAY statements. These statements do not immediately output the frames, but make them ready for output at the appropriate point in a stream page. Note also that PUT statements (most often coded using the WebSpeed {&OUT} preprocessor reference) can send output in the second section of a stream page. But this output is not part of any SpeedScript frames, which are used only by DISPLAY statements.WebSpeed also provides a means to automatically separate successive stream pages in the HTML using a specified divider. The HTML for this divider is specified by the HTML-END-OF-PAGE attribute of the WEB-CONTEXT system handle. For more information, see the "HTML Attributes of the WEB-CONTEXT Handle" section.
For more information on setting these options, see the "Changing Output Format Defaults" section in this chapter.
HTML Attributes of the WEB-CONTEXT Handle
The WEB-CONTEXT handle provides a set of attributes to modify the formatted output in a Web page. Each attribute is a character string that contains HTML you want to add to a specified portion of SpeedScript frame and paged output. Any settings that you make to these attributes last only until the next Web request. Each request causes the Agent to reset these attributes to the default values. This is true for both stateless and state-persistent Web objects.
Table 6–1 describes how to use these attributes.
For information on how to set and read these attributes, see the WEB-CONTEXT Handle entry in the Progress Language Reference. For information on setting new defaults for these attributes, see the "Setting HTML Attribute Defaults" section.
Copyright © 2004 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |