Class EntityListViewBase<T>
Shared loading, virtualisation, command and export machinery behind the entity-list render shapes (the EntityListView<T> table and the EntityListViews<T> card stack). Subclasses provide only their own markup and their chrome source.
public abstract class EntityListViewBase<T> : ComponentBase, IComponent, IHandleEvent, IHandleAfterRender, IDisposable where T : IEntity<T>
Type Parameters
T
- Inheritance
-
EntityListViewBase<T>
- Implements
- Derived
- Inherited Members
Fields
_Columns
protected IReadOnlyList<ColumnModel> _Columns
Field Value
_FirstPageLoaded
protected bool _FirstPageLoaded
Field Value
_IncludedRelationships
protected HashSet<RelationshipInfo> _IncludedRelationships
Field Value
_Ordering
protected IReadOnlyList<ListOrdering> _Ordering
Field Value
_ResolvedCount
protected int? _ResolvedCount
Field Value
- int?
Properties
AllowDirtyReads
Loads entity data without a transaction.
[Parameter]
public bool AllowDirtyReads { get; set; }
Property Value
Count
Item count for Query, if the caller already knows it. Fetched automatically otherwise.
[Parameter]
public int? Count { get; set; }
Property Value
- int?
Logger
protected ILogger Logger { get; }
Property Value
LoggerFactory
[Inject]
protected ILoggerFactory LoggerFactory { get; set; }
Property Value
Options
[Inject]
protected Options Options { get; set; }
Property Value
OwnsCount
Whether this component resolves the query count itself. EntityListViews<T> returns false while delegating to an inner EntityListView<T>.
protected virtual bool OwnsCount { get; }
Property Value
PersistKey
Distinguishes this list's persisted prerender state from identical lists on the same page.
[Parameter]
public string? PersistKey { get; set; }
Property Value
Query
The entities to list.
[Parameter]
[EditorRequired]
public required IEntityQuery<T> Query { get; set; }
Property Value
- IEntityQuery<T>
Services
[Inject]
protected IServices Services { get; set; }
Property Value
Type
Type of the entities to list. See IListSpec to customise the generated columns.
[Parameter]
[EditorRequired]
public required IEntityInfo Type { get; set; }
Property Value
Methods
Dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
public void Dispose()
GetCommands(ICommandContext)
protected IEnumerable<Command> GetCommands(ICommandContext context)
Parameters
contextICommandContext
Returns
GetExportCommands(ICommandContext)
protected IEnumerable<Command> GetExportCommands(ICommandContext cc)
Parameters
Returns
GetItemCountText()
protected string GetItemCountText()
Returns
GetRowClass(Message?)
protected string GetRowClass(Message? message)
Parameters
messageMessage?
Returns
GetRowCommands(ICommandContext, T)
protected IEnumerable<Command> GetRowCommands(ICommandContext context, T rowValue)
Parameters
contextICommandContextrowValueT
Returns
GetRowMessage(T)
The scaffolded status message for a row, or null for the default (untinted) presentation.
protected Message? GetRowMessage(T rowValue)
Parameters
rowValueT
Returns
LoadPage(ItemsProviderRequest)
protected ValueTask<ItemsProviderResult<BindingResult<T>>> LoadPage(ItemsProviderRequest request)
Parameters
requestItemsProviderRequest
Returns
OnColumnsExtracted()
Hook that runs once, immediately after the column set has been extracted.
protected virtual void OnColumnsExtracted()
OnListParametersSet()
Per-parameter-set hook for subclass chrome handling. Runs on every parameter set, before the column set is ensured.
protected virtual void OnListParametersSet()
OnParametersSetAsync()
Method invoked when the component has received parameters from its parent in the render tree, and the incoming values have been assigned to properties.
protected override Task OnParametersSetAsync()