Documentation Archive Developer
Search
PATH  Documentation > WebObjects 4.5 > WebObjects Developer's Guide


Table of Contents Previous Section

Template

You use a template to specify how the page you're creating should look. This file typically contains static HTML elements (such as <H1> or <P>) along with some 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 run-time. Some of the more commonly-used dynamic elements are listed in the following table:
Element Name Description
WOActionURL Enables the creation of URLs to invoke methods or specify pages to return.
WOApplet Generates HTML to specify a Java applet.
WOBody Specifies the background image to display for the HTML page.
WOBrowser A selection list that displays multiple items at a time.
WOCheckBox A check-box user interface control.
WOConditional Controls whether a portion of the HTML page will be generated.
WOForm A container element that generates a fill-in form.
WOHyperlink Generates a hypertext link.
WOImage Displays an image.
WOImageButton A graphical submit button.
WOJavaScript Lets you embed a script written in JavaScript in a dynamically-generated page.
WORadioButton Represents an on-off switch.
WORepetition A container element that repeats its contents (that is, everything between the <WEBOBJECT...> and </WEBOBJECT...> tags in the template file) a given number of times.
WOResetButton A reset button.
WOString A dynamically generated string.
WOSubmitButton A submit button.
WOText A multi-line field for text input and display.
WOTextField A text input field.

For a complete list of dynamic elements, along with their parameters, see the Dynamic Elements Reference.

An HTML template can also contain a reference to another component (called a reusable component or subcomponent) that represents a portion of an HTML page. This reference behaves just like a reference to a dynamic element.

Table of Contents Next Section