Server-side dynamic elements – Apple WebObjects 3.5 User Manual

Page 31

Advertising
background image

31

In the previous chapter, you learned that a WebObjects application is made
up of components, which in turn are made up of dynamic elements.
Dynamic elements are the basic building blocks of a WebObjects
application. They link an application’s behavior with the HTML page
shown in the web browser, and their contents are defined at runtime.

There are two types of dynamic elements that you can place in a
component:

Server-side dynamic elements

Client-side Java components

This chapter describes each of these types and tells you how to decide
when to use them. Before reading it, you should be familiar with the
concepts presented in the previous chapter. To learn the mechanics of using
dynamic elements, see the online book WebObjects Tools and Techniques.

Server-Side Dynamic Elements

Server-side dynamic elements are the simplest type of element to create
and are supported by all web browsers. Needless to say, they are the most
commonly used.

Server-side dynamic elements produce HTML at runtime. This HTML is
composed of the same HTML elements you use when you’re creating a
static web page. Like static elements, dynamic elements display formatted
text, images, forms, hyperlinks, and active images. WebObjects provides
several dynamic elements. For a complete list, see the online book Dynamic
Elements Reference
.

For an example of dynamic elements in action, look at the CyberWind
sample application. It’s located in

<DocRoot>/WebObjects/Examples/Java/CyberWindJava

,

where

<DocRoot>

is your web server’s document root. When you run

CyberWind, its first page contains a list of hyperlinks, shown in Figure 9.

Figure 9.

CyberWind Main Page

Advertising