Class BaseDefaultSingleViewExtenderController<DISPLAYTYPE, EXTENDEDTYPE>
The core controller for providing a IBaseDefaultSingleView<T> against an entity that extends ( IsTypeExtender) another type
If the DISPLAYTYPE
does not exist this will temporarily create one and only add it to
pending changes when the user actually modifies the temporary item itself
Inheritance
Implements
Inherited Members
Namespace: LemonEdge.Client.Core.Views.Core
Assembly: LemonEdge.ClientCore.dll
Syntax
public abstract class BaseDefaultSingleViewExtenderController<DISPLAYTYPE, EXTENDEDTYPE> : BaseDefaultSingleViewController<DISPLAYTYPE>, IModelViewController where DISPLAYTYPE : IBaseEntity where EXTENDEDTYPE : IBaseEntity
Type Parameters
Name | Description |
---|---|
DISPLAYTYPE | The type that extends the
This type must have a relationship to the |
EXTENDEDTYPE | The type that |
Constructors
BaseDefaultSingleViewExtenderController(IBaseDefaultSingleView<DISPLAYTYPE>)
Creates a new default single view extender controller with the specified instance of a default single view
Declaration
public BaseDefaultSingleViewExtenderController(IBaseDefaultSingleView<DISPLAYTYPE> view)
Parameters
Type | Name | Description |
---|---|---|
IBaseDefaultSingleView<DISPLAYTYPE> | view | The instance of the default single view in the client application |
Properties
ExtendRelationshipExtendedTypeColumn
The property on the EXTENDEDTYPE
type that is the target of the
IsTypeExtender relationship from the
DISPLAYTYPE
type
Declaration
protected virtual string ExtendRelationshipExtendedTypeColumn { get; }
Property Value
Type | Description |
---|---|
string |
ExtendRelationshipSourceDisplayTypeColumn
The property on the DISPLAYTYPE
type that has a
IsTypeExtender relationship linking to the
EXTENDEDTYPE
type
Declaration
protected abstract string ExtendRelationshipSourceDisplayTypeColumn { get; }
Property Value
Type | Description |
---|---|
string |
ListenToChanges
We check changes if HasParentToAnyRelationship is true
Declaration
public override bool ListenToChanges { get; }
Property Value
Type | Description |
---|---|
bool |
Overrides
SelectedItemForSubViews
Returns the item this view holds that can be passed to sub views
This controller can change the item is passes to sub views (such as when this represents the selected item in a grid) by calling UpdateSubViews(IModelView, bool)
Declaration
public override object SelectedItemForSubViews { get; }
Property Value
Type | Description |
---|---|
object |
Overrides
TrackChanges
We always track items as we have to see if a temporary DISPLAYTYPE
entity created has been
changed an needs to be inserted into the context for changes
Declaration
public override bool TrackChanges { get; }
Property Value
Type | Description |
---|---|
bool |
Overrides
Methods
LoadSingleItem()
Loads the DISPLAYTYPE
to be displayed against this EXTENDEDTYPE
instance from the IsTypeExtender relationship between
the two
If the item does not exist then a dummy one is created and cached, it is added to changes for this context only when the user actually makes a change to the dummy extending item instance (probably from this IBaseDefaultSingleView<T> view)
Declaration
public override Task<DISPLAYTYPE> LoadSingleItem()
Returns
Type | Description |
---|---|
Task<DISPLAYTYPE> | The extending item to be displayed in this IBaseDefaultSingleView<T> view |