C# Класс Habanero.Faces.Base.RelationshipComboBoxMapper

An interface for a mapper that
Wraps/Decorates a ComboBox in order to display a collection of business objects in a combobox so that the user can select a business object for the purposes of setting a related Business Object. This control mapper maps the Selected business object to a single relationship etc but does not automatically load the List of Related Business Objects. AutoLoadingRelationshipComboBoxMapper
Наследование: IComboBoxMapper
Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
_businessObject IBusinessObject
_logger IHabaneroLogger

Private Properties

Свойство Тип Описание
AddCurrentBOHandlers void
BusinessObject_OnSaved void
CheckBusinessObjectCollectionCorrectType void
CheckBusinessObjectCorrectType void
GetStackTrace string
IsRelationshipComposition bool
OnMappedRelationshipChanged void
RelatedBusinessObjectChanged_Handler void
RemoveCurrentBOHandlers void
SetupRelationshipForBO void
SetupSingleRelationship void
UpdateIsEditable void
UpdateLinkedRelationshipAndControl void

Открытые методы

Метод Описание
ApplyChangesToBusinessObject ( ) : void

Updates the properties on the represented business object

GetErrorMessage ( ) : string

Returns the Error Provider's Error message.

RelationshipComboBoxMapper ( IComboBox comboBox, string relationshipName, bool isReadOnly, IControlFactory controlFactory ) : System

Constructs a RelationshipComboBoxMapper with the comboBox relationshipName

SetPropertyAttributes ( Hashtable attributes ) : void

A form field can have attributes defined in the class definition. These attributes are passed to the control mapper via a hashtable so that the control mapper can adjust its behaviour accordingly.

UpdateControlValueFromBusinessObject ( ) : void

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

UpdateErrorProviderErrorMessage ( ) : void

Sets the Error Provider Error with the appropriate value for the property e.g. if it is invalid then sets the error provider with the invalid reason else sets the error provider with a zero length string.

Защищенные методы

Метод Описание
GetRelatedBusinessObject ( ) : IBusinessObject

Returns the property value of the business object being mapped

InternalUpdateControlValueFromBo ( ) : void

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

LoadCollectionForBusinessObject ( ) : void

Provides an overrideable method for custom Loading the collection of business objects

SetRelatedBusinessObject ( IBusinessObject value ) : void

Sets the property value to that provided. If the property value is invalid, the error provider will be given the reason why the value is invalid.

Приватные методы

Метод Описание
AddCurrentBOHandlers ( ) : void
BusinessObject_OnSaved ( object sender, Habanero.Base.BOEventArgs e ) : void
CheckBusinessObjectCollectionCorrectType ( IBusinessObjectCollection newBusinessObjectCollection ) : void
CheckBusinessObjectCorrectType ( IBusinessObject value ) : void
GetStackTrace ( ) : string
IsRelationshipComposition ( ) : bool
OnMappedRelationshipChanged ( ) : void
RelatedBusinessObjectChanged_Handler ( object sender, EventArgs e ) : void
RemoveCurrentBOHandlers ( ) : void
SetupRelationshipForBO ( IBusinessObject businessObject ) : void
SetupSingleRelationship ( ) : void
UpdateIsEditable ( ) : void
UpdateLinkedRelationshipAndControl ( ) : void

Описание методов

ApplyChangesToBusinessObject() публичный Метод

Updates the properties on the represented business object
public ApplyChangesToBusinessObject ( ) : void
Результат void

GetErrorMessage() публичный Метод

Returns the Error Provider's Error message.
public GetErrorMessage ( ) : string
Результат string

GetRelatedBusinessObject() защищенный Метод

Returns the property value of the business object being mapped
protected GetRelatedBusinessObject ( ) : IBusinessObject
Результат IBusinessObject

InternalUpdateControlValueFromBo() защищенный Метод

Updates the value on the control from the corresponding property on the represented IControlMapper.BusinessObject
protected InternalUpdateControlValueFromBo ( ) : void
Результат void

LoadCollectionForBusinessObject() защищенный Метод

Provides an overrideable method for custom Loading the collection of business objects
protected LoadCollectionForBusinessObject ( ) : void
Результат void

RelationshipComboBoxMapper() публичный Метод

Constructs a RelationshipComboBoxMapper with the comboBox relationshipName
public RelationshipComboBoxMapper ( IComboBox comboBox, string relationshipName, bool isReadOnly, IControlFactory controlFactory ) : System
comboBox IComboBox The combo box that is being mapped to
relationshipName string The name of the relation that is being mapped to
isReadOnly bool Whether the Combo box can be used to edit from or whether it is only viewable
controlFactory IControlFactory A control factory that is used to create control mappers etc
Результат System

SetPropertyAttributes() публичный Метод

A form field can have attributes defined in the class definition. These attributes are passed to the control mapper via a hashtable so that the control mapper can adjust its behaviour accordingly.
public SetPropertyAttributes ( Hashtable attributes ) : void
attributes System.Collections.Hashtable A hashtable of attributes, which consists /// of name-value pairs, where name is the attribute name. This is usually /// set in the XML definitions for the class's user interface.
Результат void

SetRelatedBusinessObject() защищенный Метод

Sets the property value to that provided. If the property value is invalid, the error provider will be given the reason why the value is invalid.
protected SetRelatedBusinessObject ( IBusinessObject value ) : void
value IBusinessObject
Результат void

UpdateControlValueFromBusinessObject() публичный Метод

Updates the value on the control from the corresponding property on the represented IControlMapper.BusinessObject
public UpdateControlValueFromBusinessObject ( ) : void
Результат void

UpdateErrorProviderErrorMessage() публичный Метод

Sets the Error Provider Error with the appropriate value for the property e.g. if it is invalid then sets the error provider with the invalid reason else sets the error provider with a zero length string.
public UpdateErrorProviderErrorMessage ( ) : void
Результат void

Описание свойств

_businessObject защищенное свойство

protected IBusinessObject _businessObject
Результат IBusinessObject

_logger защищенное статическое свойство

Uses for logging
protected static IHabaneroLogger _logger
Результат IHabaneroLogger