| anel
Set Headers Before reading about WildView panel set headers, you should have already read the WildView Basics topic, and the Panel Sets and Triggers topic. A panel set header is a special single line of text (a series of characters terminated by a return or line feed) that appears at the beginning of a layout file. WildView panel set headers can be used for two purposes: to enable an automatic refresh of a single panel set, or to enable automatic chaining of multiple panel sets. | |||||||||||
| efreshing
a Single Panel Set If you are using WildView to deliver information that can potentially change frequently, you can use a header in your panel set to cause the WildView applet to check for updates at a specific time interval. To enable automatic refresh for a panel set, you need to insert a header line at the beginning of the layout file with a time indicator and some text that WildView will test. Here's an example:
The "time=120" portion of the header line tells WildView that it should check this file every 120 seconds to see if the header line has changed (note that the "time=xx" -- where "xx" is the number of seconds -- can appear anywhere within the line). In this example, WildView will read the panel set every two minutes and compare the header line with the header line that it read previously. If WildView finds that the header line it has just read is different than the header line read previously, then WildView will update the display. To force an update, you need only change the text in the header. For instance, in the above example you could change the header to "time=120 Last updated at 11:29 am" and the next time that a WildView applet read the header it would realize that a change had occurred and would update the WildView display. Here's what the modified layout file might look like after the change:
| |||||||||||
| haining
Panel Sets The WildViewApplet allows you to specify a list of layout files to which WildView will have access. By placing a header line in each layout file with a time indicator, you can cause the WildView applet to cycle, or "chain," through the available layout files and to display each panel set for a pre-defined period of time. One use of chaining is to implement an advertising application. Each panel set might contain a layout for a particular ad. By setting a time to display each ad, you can automatically cycle through the ads. To illustrate chaining, we'll design a trivial WildView display that cycles between two panel sets. The first panel set (HeaderDemo1.TXT) will be similar to the one we developed in the Panel Sets and Triggers topic, except that we will use the WVPanelTeletype module to display the article text. Here is the layout for the first panel set:
Notice the "time=30" line at the beginning of the panel set. This tells the WildView applet to display this panel set for 30 seconds. The display time can be set to any number of seconds that you desire. The layout for the second panel set (HeaderDemo2.TXT) will be a single panel that implements a simple horizontal scroller. It too will be displayed for 30 seconds.
Next we present the applet tag that ties this all together:
And finally, here is the working applet: | |||||||||||
| Copyright © 1997 by Modern Minds, Inc. | |||||||||||