new EventHandlerList()

Creates a new event handler list object.

Methods

add(modelName, event, handler)

Adds a new event handler to to list.

Parameters

Name Type Optional Description

modelName

string

 

The name of the business object model.

event

bo.shared.DataPortalEvent

 

The event to listen.

handler

external.eventHandler

 

A function to be invoked when the event is emitted.

Throws

Argument error: The model name must be a non-empty string.

Argument error: The event must be a DataPortalEvent member.

Argument error: The handler must be a function.

protected
setup(target)

Adds the event handlers with the model name of the target object to the target object for all events. This method is called by models internally to set up the event handlers.

Parameter

Name Type Optional Description

target

(bo.ModalBase or bo.CollectionBase)

 

A business object instance.

Throws

Argument error: The model name must be a non-empty string.