Dynamic strings – Apple WebObjects 3.5 Tools And Techniques User Manual

Page 76

Advertising
background image

Chapter 3

Working With Dynamic Elements

76

To create a dynamic element, you click its toolbar icon. One thing to be aware
of is what happens when there are already elements selected when you create
the element:

Some dynamic elements (WOHyperlink, WOConditional, WORepetition,
custom WebObjects and generic WebObjects) can contain other elements.
In this case, the selected elements appear with the new element “wrapped”
around it.

Other dynamic elements (WOString, WOImage, WOActiveImage, and
WOApplet) can’t contain other elements. When you create one, it replaces
whatever was selected.

The first six dynamic element types (all those except for WOImage,
WOActiveImage, and WOApplet) display with a pair of icons surrounding the
element (and possibly other icons in between). For example, when you create a
repetition, it appears like this in the component window:

To bind a dynamic element, you drag from an item in the object browser to one
of the outer icons. The Inspector appears, allowing you to complete the binding.
See “Binding Elements” for more information.

You can double-click one of the icons to collapse the element into a single icon:

Collapsing can be desirable when you have dynamic elements that contain other
elements and take up a lot of space on the screen. You can double-click again to
expand the element. In addition, you can use the menu commands Elements

m

WebObjects

m

Expand All or Elements

m

WebObjects

m

Collapse All to expand

or collapse all the dynamic elements in the window.

Dynamic Strings

A WOString element represents a dynamically generated string. You bind the

value

attribute of a WOString to a variable or method that returns a string at run

Drag from the object browser to one of the outer
icons to bind (brings up Inspector).

Double-click icon to collapse or expand.

Advertising