Class SitecoreLayoutComponentFieldBindingSource

Version: 21.x

Binding source for binding Sitecore Component field data.

Inheritance
System.Object
SitecoreLayoutComponentFieldBindingSource
Namespace: Sitecore.AspNet.RenderingEngine.Binding.Sources
Assembly: Sitecore.AspNet.RenderingEngine.dll
Syntax
RequestResponse
public class SitecoreLayoutComponentFieldBindingSource : SitecoreLayoutBindingSource

Constructors

SitecoreLayoutComponentFieldBindingSource()

Initializes a new instance of the SitecoreLayoutComponentFieldBindingSource class.

Declaration
RequestResponse
public SitecoreLayoutComponentFieldBindingSource()

SitecoreLayoutComponentFieldBindingSource(String)

Initializes a new instance of the SitecoreLayoutComponentFieldBindingSource class.

Declaration
RequestResponse
public SitecoreLayoutComponentFieldBindingSource(string name)
Parameters
TypeNameDescription
System.Stringname

The name of the field in the Sitecore component to use for binding.

SitecoreLayoutComponentFieldBindingSource(String, String, Boolean, Boolean)

Initializes a new instance of the SitecoreLayoutComponentFieldBindingSource class.

Declaration
RequestResponse
public SitecoreLayoutComponentFieldBindingSource(string id, string displayName, bool isGreedy, bool isFromRequest)
Parameters
TypeNameDescription
System.Stringid

The binding source ID.

System.StringdisplayName

The display name.

System.BooleanisGreedy

A value indicating whether the source is greedy.

System.BooleanisFromRequest

A value indicating whether the data comes from the HTTP request.

Methods

GetModel(IServiceProvider, ModelBindingContext, ISitecoreRenderingContext)

Gets the model for binding.

Declaration
RequestResponse
public override object GetModel(IServiceProvider serviceProvider, ModelBindingContext bindingContext, ISitecoreRenderingContext context)
Parameters
TypeNameDescription
System.IServiceProviderserviceProvider

The System.IServiceProvider.

Microsoft.AspNetCore.Mvc.ModelBinding.ModelBindingContextbindingContext

The Microsoft.AspNetCore.Mvc.ModelBinding.ModelBindingContext.

ISitecoreRenderingContextcontext

The ISitecoreRenderingContext.

Returns
TypeDescription
System.Object

The bound model.

Overrides

Do you have some feedback for us?

If you have suggestions for improving this article,