Defining the Component API

In this section we'll extract the WebObjects elements and functionality that make up the WORollover component. At the same time, we'll get our first introduction to Variable Synchronization between WebObjects components.

Making the Component Reusable

To make a component reusable we need to make it generic. But before we start to discuss this any further, factor out the WebObjects elements that comprise a WORollover component.

Create a new component called WORollover. From the WebObjects Builder cut the WebObjects elements that make up the rollover from the Main component and paste it into the WORollover component. Remember to set the component as a Partial Document.

In addition, copy over the three variable keys highlightedImage ...

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.