C# Class Spring.Web.Support.WebFormsResultWebNavigator

An implementation of IHierarchicalWebNavigator specific for Controls. The navigator hierarchy equals the control hierarchy when using a WebFormsResultWebNavigator.

This implementation supports 2 different navigator hierarchies:

  • The default hierarchy defined by IHierarchicalWebNavigator.ParentNavigator
  • The hierarchy defined by a web form's Control.Parent hierarchy.

This implementation always checks the standard hierarchy first and - if a destination cannot be resolved, falls back to the control hierarchy for resolving a specified navigation destination.

Inheritance: DefaultResultWebNavigator
Exibir arquivo Open project: spring-projects/spring-net

Public Methods

Method Description
CanNavigateTo ( string destination ) : bool

Determines, whether this navigator or one of its parents can navigate to the destination specified in destination.

GetResultUri ( string destination, object sender, 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

NavigateTo ( string destination, object sender, object context ) : void

Redirects user to a URL mapped to specified result name.

WebFormsResultWebNavigator ( Control owner, IWebNavigator parent, IDictionary initialResults, bool ignoreCase ) : System.Collections

Creates a new instance of a IHierarchicalWebNavigator for the specified control.

Protected Methods

Method Description
CheckCanNavigate ( string destination, bool includeControlHierarchy ) : bool

Check, whether this navigator can navigate to the specified destination.

FindNavigableParent ( Control control, bool includeSelf, bool restrictToValidNavigatorsOnly ) : NavigableControlInfo

Finds the next IWebNavigator up the control hierarchy, starting at the specified control.

This method checks both, for controls implementing IWebNavigator or IWebNavigable. In addition when MasterPages are used, it interprets the control hierarchy as control->page->masterpage. (WebUtils.GetLogicalParent).

Method Details

CanNavigateTo() public method

Determines, whether this navigator or one of its parents can navigate to the destination specified in destination.
public CanNavigateTo ( string destination ) : bool
destination string the name of the navigation destination
return bool

CheckCanNavigate() protected method

Check, whether this navigator can navigate to the specified destination.
protected CheckCanNavigate ( string destination, bool includeControlHierarchy ) : bool
destination string the destination name to check.
includeControlHierarchy bool /// whether the check shall include the control hierarchy or /// the standard hierarchy only. ///
return bool

FindNavigableParent() protected static method

Finds the next IWebNavigator up the control hierarchy, starting at the specified control.
This method checks both, for controls implementing IWebNavigator or IWebNavigable. In addition when MasterPages are used, it interprets the control hierarchy as control->page->masterpage. (WebUtils.GetLogicalParent).
protected static FindNavigableParent ( Control control, bool includeSelf, bool restrictToValidNavigatorsOnly ) : NavigableControlInfo
control System.Web.UI.Control the control to start the search with.
includeSelf bool include checking the control itself or start search with its parent.
restrictToValidNavigatorsOnly bool requires s to hold a valid instance.
return NavigableControlInfo

GetResultUri() public 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
public GetResultUri ( string destination, object sender, object context ) : string
destination string Name of the result.
sender object the instance that issued this request
context object The context to use for evaluating the SpEL expression in the Result
return string

NavigateTo() public method

Redirects user to a URL mapped to specified result name.
public NavigateTo ( string destination, object sender, object context ) : void
destination string Name of the result.
sender object the instance that issued this request
context object The context to use for evaluating the SpEL expression in the Result.
return void

WebFormsResultWebNavigator() public method

Creates a new instance of a IHierarchicalWebNavigator for the specified control.
public WebFormsResultWebNavigator ( Control owner, IWebNavigator parent, IDictionary initialResults, bool ignoreCase ) : System.Collections
owner System.Web.UI.Control the control to be associated with this navigator.
parent IWebNavigator the direct parent of this navigator
initialResults IDictionary a dictionary containing results
ignoreCase bool specifies how to handle case for destination names.
return System.Collections