beautypg.com

Binding the input elements, Binding the input elements 29 – Apple WebObjects 3.5 User Manual

Page 29

background image

Binding Elements

29

Binding the Input Elements

Each dynamic element contains several attributes. These attributes
determine what happens when the element is displayed or when a form
element is submitted. When you bind an element, you actually bind one or
more of its attributes.

For example, a WOText element (which represents a multi-line text area)
is defined as having two attributes:

value

specifies the string the user enters in the text area.

name

specifies a unique identifier for the text area.

In this tutorial, the only attribute you are concerned with is

value

, which

represents the string entered by the user in the comments field. You’ll bind
this to the

comments

variable. You don’t need to bind the

name

attribute in this

application. In a later example, you’ll bind more than one attribute of an
element.

1. In the object browser, click the

comments

variable and drag the cursor into

the Comments text area. Then release the mouse button.

Binding
appears
here when
complete.

Click here
to complete
binding

Click variable name and drag to
element to begin binding.