Apple WebObjects 3.5 Tools And Techniques User Manual

Page 69

Advertising
background image

Chapter 3

Working With Dynamic Elements

69

In the figure, you have added a dynamic text field (WOTextField) to your
component. Note the blue triangle in the top left corner, which distinguishes
the dynamic text field from a static HTML text field. The long rectangle
surrounding the text field represents the form of which it is a part.

To bind the text field to the variable

myVar

:

1. Click

myVar

in the object browser and drag to inside the text field.

A black line appears as you drag, and a black border appears around the
text field, indicating that you can bind to it.

2. Release the mouse button.

The Inspector for that element appears, listing its attributes. The

value

attribute is selected by default. (This attribute represents the value that
the user enters into the text field.) If this isn’t the attribute you wish to
bind, click another attribute to select it.

3. To complete the binding, click the Connect Variable button.

The name of the variable appears in the Binding column next to the
attribute. Note that it also appears inside the text field in the component

Drag from the key to the
element to bind them.

Default attribute
is selected
automatically.

Click to complete
binding.

Advertising