# Legato.Beans.Reference

Models a reference to another bean.

Summary

Legato.Beans.Reference | Models a reference to another bean.
Properties |
target | {String} Name of the target bean.
Functions |
initialize | Constructs a new bean reference.
getInstance | Retrieves target bean from the bean factory.
Field | Creates a field reference relative to the target bean.
Legato.Beans.Reference.Field |
Properties |
reference | Reference to the target bean.
field | Name of the field of the target bean.
Functions |
initialize | Creates a new field reference.
getInstance | Value of the field of the target bean.
Configurable Components |
lb:Reference |
Configurable Properties |
target | {String} Name of the referenced bean.

### Properties

### target

{String} Name of the target bean.

### Functions

### initialize

> initialize : function( | target | )

Constructs a new bean reference.

#### Parameters

target | {String} name of the target bean.

### getInstance

> getInstance : function( | beanFactory | )

Retrieves target bean from the bean factory.

#### Returns

Target bean from the bean factory.

#### Parameters

beanFactory | {Legato.Beans.BeanFactory} bean factory.

### Field

> Field : function( | field | )

Creates a field reference relative to the target bean.

#### Returns

{Legato.Beans.Reference.Field} Field reference relative to the target bean of this field reference.

#### Parameters

field | {String} name of the field.

## Legato.Beans.Reference.Field

Summary

Properties |
reference | Reference to the target bean.
field | Name of the field of the target bean.
Functions |
initialize | Creates a new field reference.
getInstance | Value of the field of the target bean.
Configurable Components |
lb:Reference |
Configurable Properties |
target | {String} Name of the referenced bean.

### Properties

### reference

Reference to the target bean.

### field

Name of the field of the target bean.

### Functions

### initialize

> initialize : function( | reference,
> | field | )

Creates a new field reference.

#### Parameters

reference | {Legato.Beans.Reference} reference to the target bean.
field | {String} name of the field.

### getInstance

> getInstance : function( | beanFactory | )

#### Returns

Value of the field of the target bean.

#### Parameters

beanFactory | {Legato.Beans.BeanFactory} bean factory.

### Configurable Components

### lb:Reference

#### See also

- lb namespace
- {Legato.Beans.Reference}

### Configurable Properties

### target

{String} Name of the referenced bean.

> initialize : function( | target | )

Constructs a new bean reference.

> getInstance : function( | beanFactory | )

Retrieves target bean from the bean factory.

> Field : function( | field | )

Creates a field reference relative to the target bean.

> initialize : function( | reference,
> | field | )

Creates a new field reference.

> getInstance : function( | beanFactory | )

Value of the field of the target bean.
Models a reference to another bean.