Dynamic images, Woapplets – Apple WebObjects 3.5 Tools And Techniques User Manual
Page 84
Chapter 3
Working With Dynamic Elements
84
Dynamic Images
The elements WOImage and WOActiveImage are dynamic images. At run
time, WOImage is rendered as a passive image and WOActiveImage as a
mapped, active image. To create them, click
or
in the toolbar,
respectively.
A static image element requires you to specify its pathname directly in the
HTML. With dynamic images, you bind the
filename
attribute to specify the
name of an image file in your project, or in a framework. You can bind this
attribute to a variable or method so that the filename is dynamically generated
at run time.
You can also create a WOImage by dragging an image from the file system into
your component (see “Dragging Elements into the Component Window” for
more information). An alert appears, asking whether you want to add the image
to the project (if it is not already in the project). If you do, the file is added to the
Web Server Resources suitcase of your project.
WOApplets
The WOApplet dynamic element represents a Java applet or client-side
component. There are several ways to create a WOApplet. You can:
•
Click
in the toolbar.
This creates a WOApplet, whose bindings you must set.
•
Drag a file of type
.class
into your component.
You are asked whether you want to add the
.class
file to your project. If you
reply Yes, it is added to the Web Server Resources suitcase. A WOApplet