C# Class Habanero.UI.Base.ComboBoxCollectionController

This class provides mapping from a business object collection to a user interface ComboBox. This mapper is used at code level when you are explicitly providing a business object collection.
ファイルを表示 Open project: Chillisoft/habanero.faces

Public Methods

Method Description
ComboBoxCollectionController ( IComboBox comboBox, IControlFactory controlFactory ) : Habanero.Base

Constructor to create a new collection ComboBox mapper object.

SetCollection ( IBusinessObjectCollection collection, bool includeBlank ) : void

Sets the collection being represented to a specific collection of business objects

SetComboBoxCollection ( IComboBox cbx, IBusinessObjectCollection col, bool includeBlank ) : void

Set the list of objects in the ComboBox to a specific collection of business objects.
NOTE: If you are changing the business object collection, use the SetBusinessObjectCollection method instead, which will call this method automatically.

Private Methods

Method Description
BusinessObjectAddedHandler ( object sender, Habanero.Base.BOEventArgs e ) : void

This handler is called when a business object has been added to the collection - it subsequently adds the item to the ComboBox list as well.

BusinessObjectRemovedHandler ( object sender, Habanero.Base.BOEventArgs e ) : void

This handler is called when a business object has been removed from the collection - it subsequently removes the item from the ComboBox list as well.

Method Details

ComboBoxCollectionController() public method

Constructor to create a new collection ComboBox mapper object.
public ComboBoxCollectionController ( IComboBox comboBox, IControlFactory controlFactory ) : Habanero.Base
comboBox IComboBox The ComboBox object to map
controlFactory IControlFactory The control factory used to create controls
return Habanero.Base

SetCollection() public method

Sets the collection being represented to a specific collection of business objects
public SetCollection ( IBusinessObjectCollection collection, bool includeBlank ) : void
collection IBusinessObjectCollection The collection to represent
includeBlank bool Whether to a put a blank item at the /// top of the list
return void

SetComboBoxCollection() public method

Set the list of objects in the ComboBox to a specific collection of business objects.
NOTE: If you are changing the business object collection, use the SetBusinessObjectCollection method instead, which will call this method automatically.
public SetComboBoxCollection ( IComboBox cbx, IBusinessObjectCollection col, bool includeBlank ) : void
cbx IComboBox The ComboBox being mapped
col IBusinessObjectCollection The business object collection being represented
includeBlank bool Whether to include a blank item at the /// top of the list
return void