Class ScreenBase
- Namespace
- Dynamicweb.CoreUI.Screens
- Assembly
- Dynamicweb.CoreUI.dll
Abstract base class for all CoreUI screens.
public abstract class ScreenBase
- Inheritance
-
ScreenBase
- Derived
-
ScreenBase<TModel>
- Inherited Members
Remarks
Subclass ScreenBase<TModel> when the screen is model-bound. Subclass this class directly for screens that do not require a typed model. The framework calls GetDefinition() to obtain the rendered component tree; override GetDefinitionInternal() to provide screen content.
Properties
FocusedComponent
The client-side component ID that should receive initial focus when the screen renders.
public string? FocusedComponent { get; set; }
Property Value
PresetId
The ID of the screen preset to apply when rendering this screen. null means the default preset.
public long? PresetId { get; set; }
Property Value
- long?
UserScreenContext
Provides access to user-specific screen context data for the current request.
protected static UserScreenContext UserScreenContext { get; }
Property Value
Methods
GetDefinition()
Returns the fully post-processed component tree for this screen. Runs injector hooks, capability trimming, and attaches preset manage-actions.
public UiComponentBase GetDefinition()
Returns
GetDefinitionInternal()
Builds and returns the raw component tree for this screen.
protected abstract UiComponentBase GetDefinitionInternal()
Returns
Remarks
Implement this method in every concrete screen class. The result is post-processed by GetDefinition() (injectors, trimming, preset actions) before being returned to the framework.
GetInitialViewAction()
Retrieves the initial action to be performed when the view is first displayed.
protected virtual ActionBase? GetInitialViewAction()
Returns
- ActionBase
An ActionBase representing the initial view action, or null if no initial action is required.
Remarks
Override this method in a derived class to specify a custom initial action for the view. The default implementation returns null.
GetNavigationNodePath()
Returns navigation breadcrumb paths for this screen, or null if not applicable.
public virtual IEnumerable<NavigationNodePath>? GetNavigationNodePath()
Returns
Remarks
Overridden and sealed in ScreenBase<TModel>. Override here only for non-model screens that need custom breadcrumbs.
GetScreenIdentifier()
Returns a stable string identifier for this screen type, composed of the class name and a hash of its full type name.
public virtual string? GetScreenIdentifier()