Uses the
null to clear the culture.
null to clear the culture.
null to clear the culture.
null to clear the culture.
This is the most common type of object definition in ASP.Net web applications
This is the most common type of object definition in ASP.Net web applications
Takes an object class name to avoid eager loading of the object class.
Deep copy constructor.
This strategy checks if objects id ASP.Net page and if it is uses PageParser to compile and instantiate page instance. Otherwise it delagates call to its parent.
This implementation adds support for .aspx pages and scoped objects.
This class should only be used within the context of an ASP.NET web application.
This is a utility class, and as such exposes no public constructors.
As indicated by the exception that can be thrown by this method,
the ASPX page referred to by the supplied
If the supplied
Parses object definitions according to the standard Spring.NET schema.
using( new HttpContextSwitch( "/path" ) )
{
Response.Write( Request.FilePath ); // writes "/path/currentcontext.dummy" to response.
}
// Request.FilePath has been reset to original url here
This is a utility class, and as such exposes no public constructors.
Examples of what would be returned from this method given a url would be:
If relative path starts with '/' (forward slash), no concatenation will occur and it will be assumed that the relative path specified is indeed the absolute path and will be returned verbatim.
Otherwise, relative path will be appended to the application path, while making sure that path separators are not duplicated between the paths.
Examples of what would be returned from this method given a virtual path would be:
Configuration for this provider requires
Configuration for this provider requires
Configuration for this provider requires
Configuration for this provider requires
Configuration for this provider requires
Configuration for this provider requires
Configuration for this provider requires
The exporter will create a web service wrapper for the object that is to be exposed and additionally enable its configuration as a web service.
The exported object can be either a standard .NET web service
implementation, with methods marked using the standard
Defaults to the value of the exporter's object ID.
Invoked after population of normal object properties but before an init
callback like
Invoked after population of normal object properties but before an init
callback like
Provides derived classes with a default implementation of
The following example shows, how to make a Control support the DI-infrastructure:
class MyControl : Control, ISupportsWebDependencyInjection
{
private IApplicationContext _defaultApplicationContext;
public IApplicationContext DefaultApplicationContext
{
get { return _defaultApplicationContext; }
set { _defaultApplicationContext = value; }
}
override protected AddedControl( Control control, int index )
{
WebUtils.InjectDependenciesRecursive( _defaultApplicationContext, control );
base.AddedControl( control, index );
}
}
The following example shows, how to make a ControlCollection support the DI-infrastructure:
Note, that you MUST implement the single-argument constructor
class MyControlCollection : ControlCollection, ISupportsWebDependencyInjection
{
private IApplicationContext _defaultApplicationContext;
public MyControlCollection( Control owner ) : base( owner )
{}
public IApplicationContext DefaultApplicationContext
{
get { return _defaultApplicationContext; }
set { _defaultApplicationContext = value; }
}
override public Add( Control child )
{
WebUtils.InjectDependenciesRecursive( _defaultApplicationContext, child );
base.Add( child );
}
override public AddAt( int index, Control child )
{
WebUtils.InjectDependenciesRecursive( _defaultApplicationContext, child );
base.AddAt( index, child );
}
}
// web.config
<httpHandlers>
<!-- map all requests to spring (just for demo - don't do this at home!) -->
<add verb="*" path="*.*" type="Spring.Web.Support.MappingHandlerFactory, Spring.Web" />
</httpHandlers>
// spring-objects.config
<object type="Spring.Web.Support.MappingHandlerFactoryConfigurer, Spring.Web">
<property name="HandlerMap">
<dictionary>
<entry key="\.ashx$" value="standardHandlerFactory" />
<!-- map any request ending with *.whatever to standardHandlerFactory -->
<entry key="\.whatever$" value="specialHandlerFactory" />
</dictionary>
</property>
</object>
<object name="standardHandlerFactory" type="Spring.Web.Support.DefaultHandlerFactory, Spring.Web" />
<object name="specialHandlerFactory" type="MySpecialHandlerFactoryImpl" />
Parameters can reference variables accessible from the page using the
standard NAnt style property notation, namely
The
[<mode>:]<targetPage>[?param1,param2,...,paramN]
Only the
Examples of valid
Currently defaults to
See both the class documentation (
See both the class documentation (
The supplied
This is the (relative) path to the target page.
Examples of valid values would be:
class MySpecialResultLogic : IResult
{
...
}
class MySpecialResultLogicFactory : IResultFactory
{
IResult Create( string mode, string expression ) { /* ... convert 'expression' into
MySpecialResultLogic */ }
}
// register with global factory
ResultFactoryRegistry.RegisterResultFactory( "mySpecialMode", new MySpecialResultLogicFactory );
// configure your Results
<object type="mypage.aspx">
<property name="Results">
<dictionary>
<entry key="continue" value="mySpecialMode:<some MySpecialResultLogic string representation>" />
</dictionary>
</property>
// on your page call
myPage.SetResult("continue");
Issues a server-side transfer using the
Issues a redirect (to the user-agent - typically a browser) using
the
Issues a server-side transfer using the
Issues a redirect (to the user-agent - typically a browser) using
the
Classes that extend this class are used by Spring.Web client-side scripting support.
Script blocks are used to insert script code directly into the page, without references to an external file.
Script file references script code in the external file.
Script file references script code in the external file.
Credit: this control uses a slightly modified version of the Dynarch.com DHTML Calendar, written by Mihai Bazon.
Wizard steps are encapsulated within custom user controls. Wizard controller takes care of navigation through steps and loading of the appropriate user control.
Developer implementing wizard needs to inherit from this class and implement abstract, read-only StepPanel property that will be used as a container for the wizard steps. Navigation event handlers should call Previous and Next methods from this class to change current step.
The Page class is associated with files that have an .aspx extension. These files are compiled at run time as Page objects and cached in server memory.
This class extends
It also adds support for automatic localization using local page resource file, and simplifies access to global resources (resources from the message source for the application context).
Each validator can itself represent a collection of other validators if it is
an instance of
Please see the Validation Framework section in the documentation for more info.
// config:
<property Name="Results">
<dictionary>
<entry key="ok_clicked" value="redirect:~/ShowResult.aspx?age=%{Args['age']}" />
</dictionary>
</property>
// code:
void OnOkClicked(object sender, EventArgs e)
{
Args["result"] = txtAge.Text;
SetResult("ok_clicked");
}
Normally this call will be used to initialize the object.
Invoked after population of normal object properties but before an
init callback such as
Pages marked with this attribute will have "close" result predefined.
Developers should call SetResult("close") from the event handler in order to return control back to the calling page.
Each validator can itself represent a collection of other validators if it is
an instance of
Please see the Validation Framework section in the documentation for more info.
Normally this call will be used to initialize the object.
Invoked after population of normal object properties but before an
init callback such as
Each validator can itself represent a collection of other validators if it is
an instance of
Please see the Validation Framework section in the documentation for more info.
Normally this call will be used to initialize the object.
Invoked after population of normal object properties but before an
init callback such as