C# Class Spring.Web.UI.MasterPage

Spring.NET Master Page implementation for ASP.NET 1.1
Inheritance: UserControl
Datei anzeigen Open project: spring-projects/spring-net

Private Properties

Property Type Description
GetLocalResourceManager System.Resources.ResourceManager

Public Methods

Method Description
GetMessage ( string name ) : string

Returns message for the specified resource name.

GetResourceObject ( string name ) : object

Returns resource object for the specified resource name.

MasterPage ( ) : System

Initialize a new MasterPage instance.

Validate ( object validationContext ) : bool

Evaluates specified validators and returns True if all of them are valid.

Each validator can itself represent a collection of other validators if it is an instance of ValidatorGroup or one of its derived types.

Please see the Validation Framework section in the documentation for more info.

Protected Methods

Method Description
AddedControl ( Control control, int index ) : void

Injects dependencies before adding the control.

CreateValidatorParameters ( ) : object>.IDictionary

Creates the validator parameters.

This method can be overriden if you want to pass additional parameters to the validation framework, but you should make sure that you call this base implementation in order to add page, session, application, request, response and context to the variables collection.

GetResultUrl ( string resultName ) : string

Returns a redirect url string that points to the Spring.Web.Support.Result.TargetPage defined by this result evaluated using this Page for expression

GetResultUrl ( string resultName, object context ) : string

Returns a redirect url string that points to the Spring.Web.Support.Result.TargetPage defined by this result evaluated using this Page for expression

InitializeMessageSource ( ) : void

Initializes local message source

InitializeNavigationSupport ( ) : void

Ensure, that WebNavigator is set to a valid instance.

If WebNavigator is not already set, creates and sets a new WebFormsResultWebNavigator instance.
Override this method if you don't want to inject a navigator, but need a different default.

LoadControl ( Type t ) : Control

Obtains a T:System.Web.UI.UserControl object by type and injects dependencies according to Spring config file.

LoadControl ( string virtualPath ) : Control

Obtains a T:System.Web.UI.UserControl object from a user control file and injects dependencies according to Spring config file.

OnDataBound ( EventArgs e ) : void

Raises DataBound event.

OnDataUnbound ( EventArgs e ) : void

Raises DataBound event.

OnInit ( EventArgs e ) : void

Initializes user control.

OnInitializeControls ( EventArgs e ) : void

Raises InitializeControls event.

OnPreRender ( EventArgs e ) : void

Binds data from the data model into controls and raises PreRender event afterwards.

SetResult ( string resultName ) : void

Redirects user to a URL mapped to specified result name.

SetResult ( string resultName, object context ) : void

Redirects user to a URL mapped to specified result name.

Private Methods

Method Description
GetLocalResourceManager ( ) : ResourceManager

Creates and returns local ResourceManager for this page.

In ASP.NET 1.1, this method loads local resources from the web application assembly.

However, in ASP.NET 2.0, local resources are compiled into the dynamic assembly, so we need to find that assembly instead and load the resources from it.

Method Details

AddedControl() protected method

Injects dependencies before adding the control.
protected AddedControl ( Control control, int index ) : void
control System.Web.UI.Control
index int
return void

CreateValidatorParameters() protected method

Creates the validator parameters.

This method can be overriden if you want to pass additional parameters to the validation framework, but you should make sure that you call this base implementation in order to add page, session, application, request, response and context to the variables collection.

protected CreateValidatorParameters ( ) : object>.IDictionary
return object>.IDictionary

GetMessage() public method

Returns message for the specified resource name.
public GetMessage ( string name ) : string
name string Resource name.
return string

GetResourceObject() public method

Returns resource object for the specified resource name.
public GetResourceObject ( string name ) : object
name string Resource name.
return object

GetResultUrl() protected method

Returns a redirect url string that points to the Spring.Web.Support.Result.TargetPage defined by this result evaluated using this Page for expression
protected GetResultUrl ( string resultName ) : string
resultName string Name of the result.
return string

GetResultUrl() protected method

Returns a redirect url string that points to the Spring.Web.Support.Result.TargetPage defined by this result evaluated using this Page for expression
protected GetResultUrl ( string resultName, object context ) : string
resultName string Name of the result.
context object The context to use for evaluating the SpEL expression in the Result
return string

InitializeMessageSource() protected method

Initializes local message source
protected InitializeMessageSource ( ) : void
return void

InitializeNavigationSupport() protected method

Ensure, that WebNavigator is set to a valid instance.
If WebNavigator is not already set, creates and sets a new WebFormsResultWebNavigator instance.
Override this method if you don't want to inject a navigator, but need a different default.
protected InitializeNavigationSupport ( ) : void
return void

LoadControl() protected method

Obtains a T:System.Web.UI.UserControl object by type and injects dependencies according to Spring config file.
protected LoadControl ( Type t ) : Control
t System.Type The type of a user control.
return System.Web.UI.Control

LoadControl() protected method

Obtains a T:System.Web.UI.UserControl object from a user control file and injects dependencies according to Spring config file.
protected LoadControl ( string virtualPath ) : Control
virtualPath string The virtual path to a user control file.
return System.Web.UI.Control

MasterPage() public method

Initialize a new MasterPage instance.
public MasterPage ( ) : System
return System

OnDataBound() protected method

Raises DataBound event.
protected OnDataBound ( EventArgs e ) : void
e System.EventArgs Event arguments.
return void

OnDataUnbound() protected method

Raises DataBound event.
protected OnDataUnbound ( EventArgs e ) : void
e System.EventArgs Event arguments.
return void

OnInit() protected method

Initializes user control.
protected OnInit ( EventArgs e ) : void
e System.EventArgs
return void

OnInitializeControls() protected method

Raises InitializeControls event.
protected OnInitializeControls ( EventArgs e ) : void
e System.EventArgs Event arguments.
return void

OnPreRender() protected method

Binds data from the data model into controls and raises PreRender event afterwards.
protected OnPreRender ( EventArgs e ) : void
e System.EventArgs Event arguments.
return void

SetResult() protected method

Redirects user to a URL mapped to specified result name.
protected SetResult ( string resultName ) : void
resultName string Result name.
return void

SetResult() protected method

Redirects user to a URL mapped to specified result name.
protected SetResult ( string resultName, object context ) : void
resultName string Name of the result.
context object The context to use for evaluating the SpEL expression in the Result.
return void

Validate() public method

Evaluates specified validators and returns True if all of them are valid.

Each validator can itself represent a collection of other validators if it is an instance of ValidatorGroup or one of its derived types.

Please see the Validation Framework section in the documentation for more info.

public Validate ( object validationContext ) : bool
validationContext object Object to validate.
return bool