Creating dynamic elements, Using the toolbar, Dragging elements into the component window – Apple WebObjects 3.5 Tools And Techniques User Manual

Page 56

Advertising
background image

Chapter 3

Working With Dynamic Elements

56

For example, a dynamic hyperlink (WOHyperlink) has an

action

attribute

that specifies an action method in the application that is executed when the
user clicks the link.

The process of associating an attribute with a variable or method in your code is
called binding. WebObjects Builder provides tools to make it easy for you to
create bindings. Information about your bindings is stored in the declarations
(

.wod

) file in your component.

Most dynamic elements have a number of attributes that you can bind. Some
are required and others are optional. For complete information about
WebObjects’ dynamic elements and their attributes, see Dynamic Elements
Reference.

Creating Dynamic Elements

There are several methods of adding dynamic elements to your component.

Using the Toolbar

You create dynamic elements in the same way that you create other elements:
by clicking buttons in the toolbar or using the menu commands. In WebObjects
Builder, there are two groups of buttons in the switchable toolbar that allow you
to create dynamic elements:

The Forms toolbar

allows you to

create dynamic form elements. (You can also create standard HTML form
elements using this toolbar.) See “Creating Form-Based Dynamic
Elements” for more detailed information about working with forms.

The Other WebObjects toolbar

allows

you to create all other types of dynamic elements. See “Creating Other
WebObjects” for more detailed information about each type of element.

Dragging Elements into the Component Window

Some elements can be created by dragging an item from the file system into a
component window. These include:

Components (see “Reusable Components”)

Client-side Java components (see “WOApplets”)

Image files and image maps (see “Dynamic Images”)

Advertising