Dynamic Element Specifications
Dynamic elements serve as the basic building blocks of WebObjects applications by linking an application's scripted or compiled behavior to an HTML page. The linkage can be two-way, in that a dynamic element:
- Initially sets its attributes to values specified by scripted or compiled variables or methods.
- Represents itself as HTML when called upon to do so.
- Synchronizes the values of its attributes to those entered by the user, and passes these values back to your script or compiled code.
Here are the dynamic elements defined in the WebObjects Framework:
WOActionURL
WOActiveImage
WOApplet
WOBody
WOBrowser
WOCheckBox
WOCheckBoxList
WOConditional
WOEmbeddedObject
WOFileUpload
WOForm
WOFrame
WOGenericContainer
WOGenericElement
WOHiddenField
WOHyperlink
WOImage
WOImageButton
WOJavaScript
WONestedList
WOParam
WOPasswordField
WOPopUpButton
WOQuickTime
WORadioButton
WORadioButtonList
WORepetition
WOResetButton
WOResourceURL
WOString
WOSubmitButton
WOSwitchComponent
WOText
WOTextField
WOVBScript
See the WebObjects Developer's Guide for a more complete introduction to Dynamic Elements.
How to Use These Specifications
Each dynamic element specification that follows is divided into two sections: a synopsis and a description. The synopsis is designed to give you ready reference to the element's attributes, showing which ones are mandatory and which ones optional. The description explains the purpose of the element and each of its attributes.
The element synopses use several conventions that you should be aware of, for example:
WOSubmitButton { action=submitForm; value=aString; [disabled=YES|NO;] [name=aName;] ... };
- Bold denotes words or characters that are to be taken literally (typed as they appear). For example, the action and value attributes are to be take literally in the synopsis above.
- Italic denotes words that represent something else or that can be varied. For example, submitForm represents a method in your script-the exact name of the method is your choice.
- Square brackets ([ ]) mean that the enclosed attribute or attributes are optional. The name attribute and its value are optional in the synopsis above.
- A vertical bar (|) separates two options that are mutually exclusive, as in "disabled=YES|NO" where the attribute's value must be either YES or NO.
- Ellipsis (...) represents additional attributes and values that you might add but that aren't part of the element's specification. When a dynamic element is asked to produce its HTML representation, these additional attributes and values are simply copied into the HTML stream. The values for these additional attributes can be derived dynamically, just as with the built-in attributes.
The otherTagString Attribute
All dynamic elements include an optional attribute, otherTagString, Use this attribute to have the bound string included directly in an element's HTML tag. Some HTML elements contain parameters that are not key-value pairs. If you wish to include one of these parameters in your element, you can send it using this attribute.Copyright © 1998, Apple Computer, Inc. All rights reserved.