C# Class Habanero.Faces.Base.CollectionComboBoxMapper

This is used to map a collection of Business objects to a particular property of the Business object. This is typically used when you are wanting to load a collection of business objects via some custom collection loading code that does not allow you to use either the LookupComboBoxMapper or the RelationshipComboBoxMapper.
Inheritance: ControlMapper, IComboBoxMapper
Afficher le fichier Open project: Chillisoft/habanero.faces Class Usage Examples

Protected Properties

Свойство Type Description
_comboBox IComboBox

Méthodes publiques

Méthode Description
ApplyChangesToBusinessObject ( ) : void

Updates the properties on the represented business object

CollectionComboBoxMapper ( IComboBox cbx, string propName, bool isReadOnly, IControlFactory factory ) : System

Constructor to initialise the mapper

Méthodes protégées

Méthode Description
GetPropertyValue ( ) : object

Returns the property value of the business object being mapped

InitialiseWithAttributes ( ) : void

Initialises the control using the attributes already provided, using ControlMapper.SetPropertyAttributes.

InternalUpdateControlValueFromBo ( ) : void

Updates the value on the control from the corresponding property on the represented IControlMapper.BusinessObject

Private Methods

Méthode Description
ClearComboBox ( ) : void
DoUpdateControlValueFromBO ( ) : void

This is a hack that allows Extended Combo box mapper to use Collection ComboBox mapper code without having to inherit from it.

PropertyHasAValue ( ) : bool
SetValueFromLookupList ( ) : void

Populates the ComboBox's list of items using the strings provided by the colleciton

Method Details

ApplyChangesToBusinessObject() public méthode

Updates the properties on the represented business object
public ApplyChangesToBusinessObject ( ) : void
Résultat void

CollectionComboBoxMapper() public méthode

Constructor to initialise the mapper
public CollectionComboBoxMapper ( IComboBox cbx, string propName, bool isReadOnly, IControlFactory factory ) : System
cbx IComboBox The ComboBox to map
propName string The property name
isReadOnly bool Whether this control is read only
factory IControlFactory The control factory to be used when creating the controlMapperStrategy
Résultat System

GetPropertyValue() protected méthode

Returns the property value of the business object being mapped
protected GetPropertyValue ( ) : object
Résultat object

InitialiseWithAttributes() protected méthode

Initialises the control using the attributes already provided, using ControlMapper.SetPropertyAttributes.
protected InitialiseWithAttributes ( ) : void
Résultat void

InternalUpdateControlValueFromBo() protected méthode

Updates the value on the control from the corresponding property on the represented IControlMapper.BusinessObject
protected InternalUpdateControlValueFromBo ( ) : void
Résultat void

Property Details

_comboBox protected_oe property

The actual IComboBox control that is being mapped to the Business Object Property identified by PropertyName.
protected IComboBox _comboBox
Résultat IComboBox