How server-side dynamic elements work – Apple WebObjects 3.5 User Manual

Page 33

Advertising
background image

Server-Side Dynamic Elements

33

Figure 11. Server-Side Dynamic Elements

How Server-Side Dynamic Elements Work

To learn how server-side dynamic elements work, look once more at the
Main page of the CyberWind example in WebObjects Builder. If you switch
over to raw mode, you see that the Main page contains this HTML code in
its template:

Choose between the following menu options:<BR><BR>
<WEBOBJECT NAME="OPTION_REPETITION">

<WEBOBJECT NAME="OPTION_LINK">

<WEBOBJECT NAME="OPTION_NAME"></WEBOBJECT>

</WEBOBJECT>

</WEBOBJECT>

Each WEBOBJECT tag denotes the position of a dynamic element. Notice
that the tag specifies only where the dynamic element should go; it does not
specify the dynamic element’s type. The type is specified in the

.wod

file:

OPTION_REPETITION:WORepetition {

list = allOptions;
item = currentOption

};
OPTION_LINK:WOHyperlink {

action = pickOption

};
OPTION_NAME:WOString {

value = currentOption

};

Response Page

Web Browser

Server

Client

<HTML>

</HTML>

<...>

<...>

<...>

Dynamic Element

Dynamic Element

Dynamic Element

Advertising