Class EditScreenBase<TModel>.EditScreenBuilder
- Namespace
- Dynamicweb.CoreUI.Screens
- Assembly
- Dynamicweb.CoreUI.dll
Provides a constrained API for building edit screens by delegating to the owning EditScreenBase<TModel>.
public sealed class EditScreenBase<TModel>.EditScreenBuilder
- Inheritance
-
EditScreenBase<TModel>.EditScreenBuilder
- Inherited Members
Remarks
Use EditScreenBase<TModel>.EditScreenBuilder inside injectors and screen composition logic to:
- Retrieve editors for model properties.
- Add components or groups of components to tabs/sections.
- Insert dynamic fields from a FieldGroupCollection. The builder ensures additions respect layout customization and screen configuration.
Methods
AddComponent(string, string, UiComponentBase?)
Adds a single UI component to the specified tab and group heading.
public void AddComponent(string tabName, string heading, UiComponentBase? component)
Parameters
tabNamestringThe tab to add the component to.
headingstringThe section heading under which the component is placed.
componentUiComponentBaseThe component to add. If ListDisplay, it is wrapped in a Widget.
AddComponents(string, string, IEnumerable<UiComponentBase?>?)
Adds multiple UI components to the specified tab and group heading.
public void AddComponents(string tabName, string heading, IEnumerable<UiComponentBase?>? components)
Parameters
tabNamestringThe target tab.
headingstringThe section heading for the components.
componentsIEnumerable<UiComponentBase>The components to add. ListDisplay items are wrapped in Widgets.
AddComponents(string, string, string, IEnumerable<UiComponentBase?>?)
Adds multiple UI components to the specified tab and group heading.
public void AddComponents(string tabName, string heading, string explanation, IEnumerable<UiComponentBase?>? components)
Parameters
tabNamestringThe target tab.
headingstringThe section heading for the components.
explanationstringThe explanation for the section.
componentsIEnumerable<UiComponentBase>The components to add. ListDisplay items are wrapped in Widgets.
AddDynamicFields(string, Expression<Func<TModel, FieldGroupCollection>>)
Adds dynamic fields from the given expression to the specified tab.
public void AddDynamicFields(string tabName, Expression<Func<TModel, FieldGroupCollection>> expression)
Parameters
tabNamestringThe tab to receive the generated groups/editors.
expressionExpression<Func<TModel, FieldGroupCollection>>Expression resolving a FieldGroupCollection on the model.
AddDynamicFields(string, Expression<Func<TModel, FieldGroupCollection>>, string)
Adds dynamic fields with a heading prefix to the specified tab.
public void AddDynamicFields(string tabName, Expression<Func<TModel, FieldGroupCollection>> expression, string headingPrefix)
Parameters
tabNamestringThe target tab.
expressionExpression<Func<TModel, FieldGroupCollection>>Expression resolving a FieldGroupCollection on the model.
headingPrefixstringA prefix appended to each generated group heading.
EditorFor(string)
Gets an editor instance for the specified model property name, if available.
public EditorBase? EditorFor(string propertyName)
Parameters
propertyNamestringThe model property name mapped to an editor.
Returns
- EditorBase
The corresponding EditorBase or
nullif the editor is hidden, invalid per configuration, or cannot be resolved.
EditorFor<T>(Expression<Func<TModel, T>>)
Gets an editor instance for the model property specified by the expression.
public EditorBase? EditorFor<T>(Expression<Func<TModel, T>> expression)
Parameters
expressionExpression<Func<TModel, T>>An expression pointing to a model property, e.g.
m => m.Name.
Returns
- EditorBase
The corresponding EditorBase or
nullif the editor is hidden, invalid per configuration, or cannot be resolved.
Type Parameters
TThe property type.