Designing WebObjects Components

In this section we will prototype and develop a WORollover component. One that is essentially an active link with a rollover image.

Prototyping WORollover

Before we dive into developing the component, let's think about what is required.

In terms of generating HTML, we're looking at producing something along the lines of the following:

<a href="/index.html" onMouseOver="image.src='/imageH.gif'"
						onMouseOut="image.src='/imageH.gif'">
        <img src="/image.gif" name="image">
</a>

The differences will be that the link href will be a WebObjects URL. The image src will also point to a WebObjects Resource.

NOTE

Images in WebObjects are vended differently from those in WebObjects pages because of performance and efficiency. ...

Get WebObjects® Developer's Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.