Sign in Join
FPDoc Onlineexperiment

TBaseListMediator class

In unit fpObserver

Base mediator for handling lists of observable objects

Declaration

pascal
TBaseListMediator = class(TBaseMediator)

Inheritance

  1. TBaseListMediator
  2. TBaseMediator
  3. TComponent
  4. TPersistent
  5. TObject

Descends from it: TColumnsListMediator

Description

The TBaseListMediator class extends TBaseMediator to handle collections of objects. It creates individual item mediators for each object in the list and manages their lifecycle automatically.

The subject must be a TObjectList, TList, or TCollection. The mediator responds to list changes by creating, updating, or destroying item mediators as needed. T his class is abstract and must be subclassed to provide specific GUI integration.

Each item in the list is handled by a TListItemMediator instance, allowing individual objects to have their own observer relationships and data binding behavior.

See also

Properties

MediatorListprotected
SelectedObjectpublicCurrently selected object in the list

Methods

PublishedViewPropertyprotected
AddObjectprotected
SetActiveprotected
GetSelectedObjectprotected
SetSelectedObjectprotected
CreateItemMediatorprotected
DoDeleteItemMediatorprotected
CreateSubMediatorsprotected
DoViewToObjectprotected
DoObjectToViewprotected
SetSubjectprotected
FindObjectMediatorprotected
CreatepublicCreates a base list mediator instance
DestroypublicDestroys the list mediator and all item mediators
CompositeMediatorpublicReturns True indicating this is a composite mediator
ObservedChangedpublicHandles changes in the observed list objects

Events

OnBeforeSetupFieldpublishedEvent for formatting field values in all item mediators

Inherited

From TBaseMediator (25)

Active CheckPropertyName CheckViewSubject FPOObservedChanged GetView MaybeObjectToView MaybeViewToObject ObjectToView OnObjectToView OnViewToObject PublishedSubjectProperty RaiseMediatorError ReadOnly SetSubjectPropertyName Subject SubjectPropertyName Transferring Valuelist ValuelistChanged View ViewChanged ViewChangedHandler ViewClass ViewPropertyName ViewToObject

From TComponent (74)

_AddRef _Release BeforeDestruction CanObserve ChangeName ComObject ComponentCount ComponentIndex Components ComponentState ComponentStyle DefineProperties DesignInfo DestroyComponents Destroying ExecuteAction FindComponent FreeNotification FreeOnRelease GetChildOwner GetChildParent GetChildren GetDeltaStreams GetEnumerator GetIDsOfNames GetNamePath GetObservers GetOwner GetParentComponent GetTypeInfo GetTypeInfoCount HasParent iicrGetComponent InsertComponent Invoke IsImplementorOf Loaded Loading Name Notification ObserverAdded Observers OnGetDeltaStreams Owner PaletteCreated QueryInterface ReadDeltaState ReadDeltaStream ReadState ReferenceInterface RemoveComponent RemoveFreeNotification RemoveFreeNotifications SafeCallException SetAncestor SetChildOrder SetDesigning SetDesignInstance SetInline SetName SetParentComponent SetSubComponent Tag ToString TToStringNameMode UpdateAction Updated UpdateRegistry Updating ValidateContainer ValidateInsert ValidateRename VCLComObject WriteState

From TPersistent (5)

Assign AssignTo FPOAttachObserver FPODetachObserver FPONotifyObservers

From TObject (37)

AfterConstruction CheckDisposed ClassInfo ClassName ClassNameIs ClassParent ClassType CleanupInstance DefaultHandler DefaultHandlerStr Dispatch DispatchStr Disposed DisposeOf Equals FieldAddress Free FreeInstance GetDisposed GetHashCode GetInterface GetInterfaceByStr GetInterfaceEntry GetInterfaceEntryByStr GetInterfaceTable GetInterfaceWeak GetLastCastErrorInfo InheritsFrom InitInstance InstanceSize MethodAddress MethodName newinstance QualifiedClassName StringMessageTable SystemHasExtendedRTTI UnitName

An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.