Oracle Data-aware Controls Reference

oracle.dacf.dataset
Interface ValidationListener

All Superinterfaces:
java.util.EventListener
All Known Implementing Classes:
ValidationAdapter

public interface ValidationListener
extends java.util.EventListener

ValidationListener interface is intended for receiving ValidationEvents fired by an InfoObject.

InfoObjects fire validation events to:

Validation events are veteoable and are fired before the navigation events. A listener can veto the ValidationEvent by throwing a ValidationException. Vetoing the event disapproves the navigation change and stops the validation process. A listener can change this behavior and approve the navigation change by calling setcontinueNavigation() method on the ValidationException object.

ValidationAdapter provides an empty implementation of this interface. Listeners that are not interested in receiving all the events should subclass from ValidationAdapter and override appropriate methods.

ValidationListeners can be registered with the AttributeInfo, RowSetInfo, LOVRowSetInfo, or SessionInfo with increasing levels of scope. The higher up they are placed, the more general they should be. For example, to validate that column values are within a certain range, register the listener against the column. To ensure that a number of columns fulfill certain validation rules, register the listener against the RowSet. To enforce integrety constraints on multiple RowSets, register the listener with the SessionInfo.

Levels of Validation

Each level of navigation is validated. The order of validation from lowest to highest is:

The individual navigation items are validated from smallest-grain to coarsest:

See Also:
LOVAttributeInfo, AttributeInfo, SessionInfo, RowSetInfo, ValidationAdapter, ValidationManager, ValidationEvent, ValidationException, InfoObject.addValidationListener(oracle.dacf.dataset.ValidationListener)

Method Summary
 void validateAttribute(ValidationEvent event)
          Called to validate column level data changes.
 void validateRow(ValidationEvent event)
          Called to validate row level data changes.
 void validateRowSet(ValidationEvent event)
          Called to validate queryview (RowSet) level data changes.
 void validateSession(ValidationEvent event)
          Called to validate session level data changes.
 

Method Detail

validateAttribute

public void validateAttribute(ValidationEvent event)
                       throws ValidationException
Called to validate column level data changes.
Parameters:
event - the event.
Throws:
ValidationException - if the data is invalid.

validateRow

public void validateRow(ValidationEvent event)
                 throws ValidationException
Called to validate row level data changes.
Parameters:
event - the event.
Throws:
ValidationException - if the data is invalid.

validateRowSet

public void validateRowSet(ValidationEvent event)
                    throws ValidationException
Called to validate queryview (RowSet) level data changes.
Parameters:
event - the event.
Throws:
ValidationException - if the data is invalid.

validateSession

public void validateSession(ValidationEvent event)
                     throws ValidationException
Called to validate session level data changes.
Parameters:
event - the event.
Throws:
ValidationException - if the data is invalid.

Oracle Data-aware Controls Reference