C# Class Spring.Web.UI.Controls.AbstractValidationControl

Provides common functionality to all validation renderer controls.
Inheritance: System.Web.UI.Control
Datei anzeigen Open project: spring-projects/spring-net

Protected Methods

Method Description
CreateValidationErrorsRenderer ( ) : IValidationErrorsRenderer

Create the default IValidationErrorsRenderer for this ValidationControl if none is configured.

FindValidationContainer ( ) : IValidationContainer

Gets the IValidationContainer, who's IValidationContainer.ValidationErrors shall be rendered by this control.

First, it tries to resolve the specified ValidationContainerName, if any. If no explicit name is set, will probe the control hierarchy for controls implementing IValidationContainer.

Render ( System.Web.UI.HtmlTextWriter writer ) : void

Renders error messages using the specified Renderer.

ResolveErrorMessages ( ) : IList

Resolves the list of validation errors either explicitely specified using ValidationErrors or obtained from the containing IValidationContainer resolved by FindValidationContainer to a list of string elements containing the error messages to be rendered.

The list of validation errors may either be explicitely specified using ValidationErrors or will automatically be obtained from the containing IValidationContainer resolved by FindValidationContainer.

Error Messages are resolved using either an explicitely specified MessageSource or the IMessageSource obtained from the validation container.

ResolveMessageSource ( ) : IMessageSource

Gets the MessageSource to be used for resolve error messages

By default, returns FindValidationContainer's MessageSource.

ResolveValidationErrors ( ) : IValidationErrors

Gets the list of validation errors to render

Method Details

CreateValidationErrorsRenderer() protected abstract method

Create the default IValidationErrorsRenderer for this ValidationControl if none is configured.
protected abstract CreateValidationErrorsRenderer ( ) : IValidationErrorsRenderer
return IValidationErrorsRenderer

FindValidationContainer() protected method

Gets the IValidationContainer, who's IValidationContainer.ValidationErrors shall be rendered by this control.
First, it tries to resolve the specified ValidationContainerName, if any. If no explicit name is set, will probe the control hierarchy for controls implementing IValidationContainer.
protected FindValidationContainer ( ) : IValidationContainer
return IValidationContainer

Render() protected method

Renders error messages using the specified Renderer.
protected Render ( System.Web.UI.HtmlTextWriter writer ) : void
writer System.Web.UI.HtmlTextWriter
return void

ResolveErrorMessages() protected method

Resolves the list of validation errors either explicitely specified using ValidationErrors or obtained from the containing IValidationContainer resolved by FindValidationContainer to a list of string elements containing the error messages to be rendered.

The list of validation errors may either be explicitely specified using ValidationErrors or will automatically be obtained from the containing IValidationContainer resolved by FindValidationContainer.

Error Messages are resolved using either an explicitely specified MessageSource or the IMessageSource obtained from the validation container.

protected ResolveErrorMessages ( ) : IList
return IList

ResolveMessageSource() protected method

Gets the MessageSource to be used for resolve error messages
By default, returns FindValidationContainer's MessageSource.
protected ResolveMessageSource ( ) : IMessageSource
return IMessageSource

ResolveValidationErrors() protected method

Gets the list of validation errors to render
protected ResolveValidationErrors ( ) : IValidationErrors
return IValidationErrors