# View Object States and Events

The Business Components for Java framework follows the standard Java/EJB event delegation model for propagating events among middle-tier objects. Publishers (also called senders) fire events, subscribers (also called listeners) respond to them.

Java event types are classes that extend `java.util.EventObject`. The framework sends an event from a publisher to a subscriber by invoking a method of the `RowSetListener` interface on the subscriber and passing in an instance of the event type generated. The subscriber registers listeners by using `add` EventType `Listener()` on the publisher.

The publisher defines the set of events it emits by providing `add` EventType `Listener` methods which register specific listeners for those events.

A subscriber implements a specific `EventListener` interface, `RowSetListener`, that extends `java.util.EventListener`. An `EventListener` interface defines one or more methods to invoke in response to each specific event type handled by the interface.

The following Business Components for Java classes for built-in events can be found in the `oracle.jbo` package. They can be published by various Business Components and are used to manage three-tier communications.

Event Class | Description
`JboEvent` | Extends `java.util.EventObject.` All Business Component events subclass this class.
`NavigationEvent` | Fired when the iterator position in a View Object changes. It provides the following methods: `getPreviousRow` `getPreviousRowIndex` `getNextRow` `getNextRowIndex` `toString`
`RangeEvent` | Base class for range oriented event. `RangeRefreshEvent`, and `ScrollEvent` subclass this class.
`RangeRefreshEvent` | Fired when the range is refreshed, not when a row is updated--use `UpdateEvent` for that. In addition to `RangeEvent` methods, it has the following methods: `getAllRowsInRange` `getRangeStart` `getRowCountInRange` `toString`
`ScrollEvent` | Fired when the range is scrolled. In addition to `RangeEvent` methods, it has the following methods: `getRangeStartBefore` `getScrollAmount` `getFirstNewRowRangeIndex` `getNewRowCountInRange`
`RowEvent` | `RowEvent` is the base class for other row-oriented events. It has the following methods: `getRow` `getRowIndex`
`InsertDeleteEvent` | Used for insert or delete event. In addition to `RowEvent` methods, it has the following methods: `getRowCountInRangeBefore` `getRowCountInRange` Note: `getRowIndex` returns the absolute row index, not range-relative.
`InsertEvent` | Provides a `toString` method.
`DeleteEvent` | Provides a `toString` method.
`UpdateEvent` | Adds the following methods: `getChangedAttrIndices` `getChangedAttrNames`