C# Class Habanero.Faces.Base.ComboBoxManager

This manager groups common logic for IComboBox objects. Do not use this object in working code - rather call CreateComboBox in the appropriate control factory.
Mostra file Open project: Chillisoft/habanero.faces Class Usage Examples

Public Methods

Method Description
ComboBoxManager ( IComboBox comboBox )

Creates ComboBoxManager

GetItemToSelect ( object value ) : object

If the IComboBox contains ComboPairs ;
If the value equals a ComboPair.Key for a ComboPair then return the ComboPair;
else returns null;
else return the value;

GetSelectedItem ( object selectedItem ) : object

Returns the Key for the Selected Item if it is a ComboPair else returns the selectedItem.

GetSelectedValue ( object item ) : object

If the item is a ComboPair then returns the ComboPair.Value for the ComboPair else returns the item.

GetValueToSelect ( object value ) : object

If the IComboBox contains ComboPairs
If the value is equal to the ComboPair.Value for a ComboPair then
returns the ComboPair else returns the null.
Else
returns the value

Method Details

ComboBoxManager() public method

Creates ComboBoxManager
public ComboBoxManager ( IComboBox comboBox )
comboBox IComboBox

GetItemToSelect() public method

If the IComboBox contains ComboPairs ;
If the value equals a ComboPair.Key for a ComboPair then return the ComboPair;
else returns null;
else return the value;
public GetItemToSelect ( object value ) : object
value object
return object

GetSelectedItem() public method

Returns the Key for the Selected Item if it is a ComboPair else returns the selectedItem.
public GetSelectedItem ( object selectedItem ) : object
selectedItem object
return object

GetSelectedValue() public method

If the item is a ComboPair then returns the ComboPair.Value for the ComboPair else returns the item.
public GetSelectedValue ( object item ) : object
item object
return object

GetValueToSelect() public method

If the IComboBox contains ComboPairs
If the value is equal to the ComboPair.Value for a ComboPair then
returns the ComboPair else returns the null.
Else
returns the value
public GetValueToSelect ( object value ) : object
value object
return object