PATH |
Dynamic Element Specifications
Introduction
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.
With WebObjects, most pages sent to the user's browser are composed of HTML from a static template combined with HTML that's dynamically generated by dynamic elements embedded (directly, or in the case of reusable components, indirectly) in that template.
Here are the dynamic elements defined in the WebObjects Framework:
- WOActionURL
- WOActiveImage
- WOApplet
- WOBody
- WOBrowser
- WOCheckBox
- WOCheckBoxList
- WOComponentContent
- 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 three sections: a synopsis, a description, and a set of bindings. 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. Finally, the bindings describe in detail each of the dynamic element's attributes.
The element synopses use several conventions that you should be aware of, for example:
WOVBScript { scriptFile=aPath | scriptString=aString | scriptSource=aURL; [hideInComment=aBoolean;] ... };- Italic denotes words that represent something else or that can be varied. For example, aPath represents a path to a file-the exact path 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 options that are mutually exclusive,
as in
scriptFile=aPath | scriptString=aString | scriptSource=aURL
, where you can specify either a scriptFile, a scriptString, or a scriptSource, but not some combination of the three. - 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 remaining words or characters are to be taken literally (that is, they should be typed as they appear). For example, the scriptFile and scriptString and other attribute names are to be take literally in the synopsis above.
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.