Castle.MonoRail.Framework Adapter to expose a valid implementation on top of HttpContext. Basic implementation of Initializes a new instance of the class. Initializes a new instance of the class. The parent. Adds the specified service to the service container. The type of service to add. An instance of the service type to add. This object must implement or inherit from the type indicated by the serviceType parameter. Adds the specified service to the service container, and optionally promotes the service to any parent service containers. The type of service to add. An instance of the service type to add. This object must implement or inherit from the type indicated by the serviceType parameter. true to promote this request to any parent service containers; otherwise, false. Adds the specified service to the service container. The type of service to add. A callback object that is used to create the service. This allows a service to be declared as available, but delays the creation of the object until the service is requested. Adds the specified service to the service container, and optionally promotes the service to parent service containers. The type of service to add. A callback object that is used to create the service. This allows a service to be declared as available, but delays the creation of the object until the service is requested. true to promote this request to any parent service containers; otherwise, false. Removes the specified service type from the service container. The type of service to remove. Removes the specified service type from the service container, and optionally promotes the service to parent service containers. The type of service to remove. true to promote this request to any parent service containers; otherwise, false. Gets the service object of the specified type. An object that specifies the type of service object to get. A service object of type serviceType.-or- null if there is no service object of type serviceType. Gets the service. Gets or sets the parent container. The parent. Gets the parent container. The parent container. Represents an abstraction between the MonoRail API and the ASP.Net API. Transfer the execution to another resource. Request a service from the engine context. Service type Service instance Gets the request type (GET, POST, etc) Gets the request URL. Gets the referring URL. Gets the underlying context of the API being used. Access the params (Query, Post, headers and Cookies) Access the session objects. Gets the request object. Gets the response object. Gets the trace object. Access the Cache associated with this web execution context. Access a dictionary of volative items. Gets or sets the current user. Gets the last exception raised during the execution of an action. Returns the application path. Returns the physical application path. Returns the of the the current request. Returns an . Returns the Items collection from the current HttpContext. Gets or sets the current controller. The current controller. If a container is available for the app, this property exposes its instance. Initializes a new instance of the class. The parent. Url information The context. External container instance Transfer the execution to another resource. Resolves the request session. Gets the last exception raised during the execution of an action. Gets the request type (GET, POST, etc) Gets the request URL. Gets the referring URL. Gets the underlying context of the API being used. Access the params (Query, Post, headers and Cookies) Access the session objects. Gets the request object. Gets the response object. Gets the trace object. Returns an . Access the Cache associated with this web execution context. Access a dictionary of volative items. Gets or sets the current user. Returns the of the the current request. Returns the application path. Returns the physical application path. Returns the Items collection from the current HttpContext. Gets or sets the current controller. The current controller. If a container is available for the app, this property exposes its instance. Adapts the ASP.Net HttpFileCollection to MonoRail dictionary Initializes a new instance of the class. The file collection. Determines whether the object contains an element with the specified key. The key to locate in the object. true if the contains an element with the key; otherwise, false. key is null. Adds an element with the provided key and value to the object. The to use as the key of the element to add. The to use as the value of the element to add. An element with the same key already exists in the object. key is null. The is read-only.-or- The has a fixed size. Removes all elements from the object. The object is read-only. Returns an object for the object. An object for the object. Removes the element with the specified key from the object. The key of the element to remove. The object is read-only.-or- The has a fixed size. key is null. Copies the elements of the to an , starting at a particular index. The one-dimensional that is the destination of the elements copied from . The must have zero-based indexing. The zero-based index in array at which copying begins. array is null. index is less than zero. array is multidimensional.-or- index is equal to or greater than the length of array.-or- The number of elements in the source is greater than the available space from index to the end of the destination array. The type of the source cannot be cast automatically to the type of the destination array. Returns an enumerator that iterates through a collection. An object that can be used to iterate through the collection. Gets an object containing the keys of the object. An object containing the keys of the object. Gets an object containing the values in the object. An object containing the values in the object. Gets a value indicating whether the object is read-only. true if the object is read-only; otherwise, false. Gets a value indicating whether the object has a fixed size. true if the object has a fixed size; otherwise, false. Gets or sets the with the specified key. Gets the number of elements contained in the . The number of elements contained in the . Gets an object that can be used to synchronize access to the . An object that can be used to synchronize access to the . Gets a value indicating whether access to the is synchronized (thread safe). true if access to the is synchronized (thread safe); otherwise, false. This class adapts the HttpRequest to a MonoRail IRequest. Represents the request data Reads the request data as a byte array. How many bytes. Reads the cookie. The cookie name. Validates the input. Gets the Http headers. The Http headers. Gets the per key. Gets the params which accumulates headers, post, querystring and cookies. The params. Gets a value indicating whether this requeest is from a local address. true if this instance is local; otherwise, false. Gets the raw URL. The raw URL. Gets the URI. The URI. Gets the HTTP method. The HTTP method. Gets the file path. The file path. Gets the param with the specified key. Gets the query string. The query string. Gets the form. The form. Gets the user languages. The user languages. Gets the IP host address of the remote client. The IP address of the remote client. Initializes a new instance of the class. The request. Reads the request data as a byte array. How many bytes. Reads the cookie. The cookie name. Validates the input. Gets the Http headers. The Http headers. Gets a value indicating whether this requeest is from a local address. true if this instance is local; otherwise, false. Gets the HTTP method. The HTTP method. Gets the URI. The URI. Gets the raw URL. The raw URL. Gets the file path. The file path. Gets the query string. The query string. Gets the form. The form. Gets the param with the specified key. Gets the per key. Gets the params which accumulates headers, post, querystring and cookies. The params. Gets the user languages. The user languages. Gets the IP host address of the remote client. The IP address of the remote client. Adapts the to an instance. Represents the response data and operations Appends the header. The name. The value. Writes the buffer to the browser The buffer. Writes the stream to the browser The stream. Clears the response (only works if buffered) Clears the response content (only works if buffered). Writes the specified string. The string. Writes the specified obj. The obj. Writes the specified char. The char. Writes the specified buffer. The buffer. The index. The count. Writes the file. Name of the file. Redirects the specified controller. The controller. The action. Redirects the specified area. The area. The controller. The action. Redirects the specified URL. The URL. Redirects the specified URL. The URL. if set to true [end process]. Creates a cookie. The name. The value. Creates a cookie. The name. The value. The expiration. Creates a cookie. The cookie. Removes a cookie. The name. Gets or sets the status code. The status code. Gets or sets the type of the content. The type of the content. Gets the caching policy (expiration time, privacy, vary clauses) of a Web page. Sets the Cache-Control HTTP header to Public or Private. Gets or sets the HTTP character set of the output stream. Gets the output. The output. Gets the output stream. The output stream. Gets a value indicating whether the response sent a redirect. true if was redirected; otherwise, false. Gets a value indicating whether this instance is client connected. true if this instance is client connected; otherwise, false. Initializes a new instance of the class. The response. The parent context. The app path. Appends the header. The name. The header value. Writes the buffer to the browser The buffer. Writes the stream to the browser The stream. Clears the response (only works if buffered) Clears the response content (only works if buffered). Writes the specified string. The string. Writes the specified obj. The obj. Writes the specified char. The char. Writes the specified buffer. The buffer. The index. The count. Writes the file. Name of the file. Redirects the specified URL. The URL. Redirects the specified URL. The URL. if set to true [end process]. Redirects the specified controller. The controller. The action. Redirects the specified area. The area. The controller. The action. Creates the cookie. The name. The cookie value. Creates the cookie. The name. The cookie value. The expiration. Creates the cookie. The cookie. Removes the cookie. The name. Gets the caching policy (expiration time, privacy, vary clauses) of a Web page. Sets the Cache-Control HTTP header to Public or Private. Gets or sets the HTTP character set of the output stream. Gets or sets the status code. The status code. Gets or sets the content type. The type of the content. Gets the output. The output. Gets the output stream. The output stream. Gets a value indicating whether this instance is client connected. true if this instance is client connected; otherwise, false. Gets a value indicating whether the response sent a redirect. true if was redirected; otherwise, false. Adapts the ASP.Net HttpServerUtility to MonoRail's interface for the same service. Represents utility methods that web servers provide Returns the physical path for the specified virtual path. The virtual path. The mapped path HTML encodes a string and returns the encoded string. The text string to HTML encode. The HTML encoded text. URL encodes a string and returns the encoded string. The text to URL encode. The URL encoded text. URL decodes a string and returns the decoded string. The text to URL decode. The URL decoded text. URL encodes the path portion of a URL string and returns the encoded string. The text to URL encode. The URL encoded text. Escapes JavaScript with Url encoding and returns the encoded string. Converts quotes, single quotes and CR/LFs to their representation as an escape character. The text to URL encode and escape JavaScript within. The URL encoded and JavaScript escaped text. Initializes a new instance of the class. The server. HTML encodes a string and returns the encoded string. The text string to HTML encode. The HTML encoded text. Escapes JavaScript with Url encoding and returns the encoded string. Converts quotes, single quotes and CR/LFs to their representation as an escape character. The text to URL encode and escape JavaScript within. The URL encoded and JavaScript escaped text. URL encodes a string and returns the encoded string. The text to URL encode. The URL encoded text. URL decodes a string and returns the decoded string. The text to URL decode. The URL decoded text. URL encodes the path portion of a URL string and returns the encoded string. The text to URL encode. The URL encoded text. Returns the physical path for the specified virtual path. The virtual path. The mapped path Adapts the ASP.Net session as a simple dictionary for MonoRail Initializes a new instance of the class. The session. Returns an object for the object. An object for the object. Copies the elements of the to an , starting at a particular index. The one-dimensional that is the destination of the elements copied from . The must have zero-based indexing. The zero-based index in array at which copying begins. array is null. index is less than zero. array is multidimensional.-or- index is equal to or greater than the length of array.-or- The number of elements in the source is greater than the available space from index to the end of the destination array. The type of the source cannot be cast automatically to the type of the destination array. Returns an enumerator that iterates through a collection. An object that can be used to iterate through the collection. Determines whether the object contains an element with the specified key. The key to locate in the object. true if the contains an element with the key; otherwise, false. key is null. Adds an element with the provided key and value to the object. The to use as the key of the element to add. The to use as the value of the element to add. An element with the same key already exists in the object. key is null. The is read-only.-or- The has a fixed size. Removes all elements from the object. The object is read-only. Removes the element with the specified key from the object. The key of the element to remove. The object is read-only.-or- The has a fixed size. key is null. Gets an object containing the keys of the object. An object containing the keys of the object. Gets the number of elements contained in the . The number of elements contained in the . Gets an object that can be used to synchronize access to the . An object that can be used to synchronize access to the . Gets a value indicating whether access to the is synchronized (thread safe). true if access to the is synchronized (thread safe); otherwise, false. Gets an object containing the values in the object. An object containing the values in the object. Gets a value indicating whether the object is read-only. true if the object is read-only; otherwise, false. Gets a value indicating whether the object has a fixed size. true if the object has a fixed size; otherwise, false. Gets or sets the with the specified key. Delegates to ASP.Net TraceContext. Represents the trace that ASP.Net exposes Logs the specified message on the ASP.Net trace The message. Logs the specified message on the ASP.Net trace The category. The message. Logs the specified message on the ASP.Net trace The category. The message. The error info. Logs the specified message on the ASP.Net trace The message. Logs the specified message on the ASP.Net trace The category. The message. Logs the specified message on the ASP.Net trace The category. The message. The error info. Initializes a new instance of the class. The trace context. Logs the specified message on the ASP.Net trace The message. Logs the specified message on the ASP.Net trace The category. The message. Logs the specified message on the ASP.Net trace The category. The message. The error info. Logs the specified message on the ASP.Net trace The message. Logs the specified message on the ASP.Net trace The category. The message. Logs the specified message on the ASP.Net trace The category. The message. The error info. Enum to identify a http verb The GET method means retrieve whatever information is identified by the Request-URI. The convention has been established that the GET method SHOULD NOT have the significance of taking an action other than retrieval. The POST method is used to request that the origin server accept the entity enclosed in the request as a new subordinate of the resource identified by the Request-URI in the Request-Line. The convention has been established that the POST method will take an action other than just retrieval. Decorates an action with a restriction to the HTTP method that is allowed to request it. Constructs a AccessibleThroughAttribute with the specified . The to allow for this action. The Verb to allow. Defines that an action is accessible through AJAX calls, so can generate a JavaScript proxy for it. Method marked with this attribute will be accessible through AJAX calls, and will be able to generate a JavaScript proxy for them. Method marked with this attribute will be accessible through AJAX calls, and will be able to generate a JavaScript proxy for them. A name for the action, on the JavaScript proxy. Useful when dealing with overloaded Ajax actions, as JavaScript does not support function overloading. A name for the action, on the JavaScript proxy. Useful when dealing with overloaded Ajax actions, as JavaScript does not support function overloading. Defines the cache configuration for an action. Custom attributes can implement this interface to have a chance to apply some specific configuration to the Implementors should configure the specified policy. The cache policy. Initializes a new instance of the class. Sets the Cache-Control HTTP header. The Cache-Control HTTP header controls how documents are to be cached on the network. Configures ASP.Net's Cache policy based on properties set cache policy to set From MSDN: Makes the response is available in the client browser History cache, regardless of the HttpCacheability setting made on the server, when the allow parameter is true. When HttpCacheability is set to NoCache or ServerAndNoCache the Expires HTTP header is by default set to -1; this tells the client not to cache responses in the History folder, so that when you use the back/forward buttons the client requests a new version of the response each time. You can override this behavior by calling the SetAllowResponseInBrowserHistory method with the allow parameter set to true. If HttpCacheability is set to values other than NoCache or ServerAndNoCache, calling the SetAllowResponseInBrowserHistory method with either value for allow has no effect. From MSDN: Sets cache expiration to from absolute to sliding. When cache expiration is set to sliding, the Cache-Control HTTP header will be renewed with each response. This expiration mode is identical to the IIS configuration option to add an expiration header to all output set relative to the current time. If you explicitly set sliding expiration to off (false), that setting will be preserved and any attempts to enable sliding expiration will silently fail. This method does not directly map to an HTTP header. It is used by subsequent modules or worker requests to set origin-server cache policy. Specifies whether the ASP.NET cache should ignore HTTP Cache-Control headers sent by the client that invalidate the cache. This method is provided because some browsers, when refreshing a page view, send HTTP cache invalidation headers to the Web server and evict the page from the cache. When the validUntilExpires parameter is true, ASP.NET ignores cache invalidation headers and the page remains in the cache until it expires. Sets the ETag HTTP header to the specified string. The ETag header is a unique identifier for a specific version of a document. It is used by clients to validate client-cached content to avoid requesting it again. Once an ETag header is set, subsequent attempts to set it fail and an exception is thrown. Cache Duration (in seconds) Specifies a custom text string to vary cached output responses by. Gets or sets the list of all HTTP headers that will be used to vary cache output. When a cached item has several vary headers, a separate version of the requested document is available from the cache for each HTTP header type. Gets or sets the list of parameters received by an HTTP GET or HTTP POST that affect caching. A separate version of the requested document is available from the cache for each named parameter in the VaryByParams collection. Decorates a controller with a different name and optionally an area which the controller belongs to. This is used to override the convention for controller names and to optionally associate a controller with an area name. Constructs a ControllerDetailsAttribute Constructs a ControllerDetailsAttribute with a name for the controller. The specified Controller Name The controller's name The controller's area Defines where the parameters should be obtained from Query string Only from the Form From QueryString, Form and Environment variables. The DataBind Attribute is used to indicate that an Action methods parameter is to be intercepted and handled by the . Allowed usage is one per method parameter, and is not inherited. Implemented by attributes that wants to perform some conversion to populate a smart dispatcher action argument. Calculates the param points. Implementors should return value equals or greater than zero indicating whether the parameter can be bound successfully. The greater the value (points) the more successful the implementation indicates to the framework The controller. The parameter info. Binds the specified parameters for the action. The controller. The parameter info. Creates a with an associated prefix. The prefix must be present in the form data and is used to avoid name clashes. Implementation of and it is used to give the method a weight when overloads are available. The controller instance The parameter info Positive value if the parameter can be bound Implementation of and it is used to read the data available and construct the parameter type accordingly. The controller instance The parameter info The bound instance Creates the binder. Configures the validator. The controller. The binder. Populates the validator error summary. The controller. The binder. The instance. Binds the instance errors. The controller. The binder. The instance. Gets or sets the property names to exclude. The property name should include the prefix. A comma separated list of property names to exclude from databinding. Gets or sets the property names to allow. The property name should include the prefix. A comma separated list of property names to allow from databinding. Gets or sets a value indicating whether the target should be validate during binding. true if should be validated; otherwise, false. Gets or sets used to indicate where to get the values from The type. Typically . Gets the databinding prefix. The prefix is a name followed by a dot that prefixes the entries names on the source http request. The databinding prefix. Declares that the Controller should enable a DefaultAction method for request processing if no action can be found with the supplied name Constructs a using DefaultAction as the default action name Constructs a using the supplied value as the default action name Gets the default action name Associates a provider that can add dynamic actions to a controller Constructs a associating the supplied type as the action provider. Gets the provider type Decorates a controller associating a implementation with it. More than one can be associated. If more than one filter is associate with an action (or controller and action), the order of execution cannot be predicted. In this case use to define the order of execution. Contract for builders. Builds the filter descriptors. Constructs a FilterAttribute associating the filter type and when the filter should be invoked. When to execute the filter The filter implementation Implementation of . Returns the descriptor for this filter association. Gets the filter implementation type Gets when to run the filter Gets or sets the filter execution order. The lower the value, the higher the priority Associates a helper class with the controller. Contract for builders Builds the helper descriptors. Constructs a with the supplied helperType. The helper type Constructs a with the supplied helperType and a name to be bound to it. The helper type Name bound to the helper. The name will be used on the view to gain access to it implementation. Gets the that describes the helper. The descriptor instance Gets Name bound to the helper. The name will be used on the view to gain access to it Gets the helper type Associates a layout name with a controller. The layout can later be changed using the LayoutName property of the . Contract for builders Builds the layout descriptor. Constructs a LayoutAttribute with the layout name. implementation. Gets the descriptor that describes the layout. Gets the layout name This is an special filter attribute. It is used to define from where MonoRail should read the localization information to find out the locale of the client. For example, it can use the browser, or a cookie, an entry in the query string (or even in the session) Defines that you want to use a cookie named "locale", but if that fails it falls back to the client's browser locale. Defines a new LocalizationFilter. Location where the localization parameter is stored. Name of the parameter in the store. Key under which the locale value is stored. Location where the locale value is to be stored. True if an exception is to be thrown when a specific culture appears to be incorrect (can't be created). Use client browser defined languages as default. Apply PersistFlashFilter, which preserve all flash contents after execution of all actions on the applied controller. Default constructor. This would persist the entire flash bag. Associates a rescue template with a or an action (method). The rescue is invoked in response to some exception during the action processing. The view must exist in the rescues folder in your view folder Contract for builders Builds the rescue descriptors. Constructs a RescueAttribute with the template name. The view to use in the event of error Constructs a RescueAttribute with the template name and exception type. The view to use in the event of error The exception to match implementation. Builds the rescue descriptors. Gets the view name to use Gets the exception type Declares that for the specified class or method, the given resource file should be loaded and set available in the PropertyBag with the specified name. Contract for builders Builds the resource descriptors. Constructs a resource attribute, with the specified name, based on the resource in a satellite assembly. Name the resource will be available as in the PropertyBag Fully qualified name of the resource in the sattelite assembly implementation. Builds the resource descriptors. Gets or sets the Name the of resource that will be available in the PropertyBag. The name. Gets or sets the Fully qualified name of the resource in the sattelite assembly. The name of the resource. Gets or sets the name of the culture. The name of the culture. Gets or sets the name of the assembly. The name of the assembly. Gets or sets the type of the resource. The type of the resource. Associates scaffolding support with a controller. Initializes a new instance of the class. The model/entity that should be implemented Gets the model/entity type The model/entity type. Declares that for the specific method (action) no filter should be applied -- or an specific filter should be skipped. Constructs a SkipFilterAttribute which skips all filters. Constructs a SkipFilterAttribute associating the filter type that should be skipped. The filter type to be skipped Gets the type of the filter. The type of the filter. Gets a value indicating whether [blanket skip]. true if [blanket skip]; otherwise, false. Declares that for the specific method (action) no rescue should be performed. Decorates an action associating a implementation with it. More than one can be associated. If more than one filter is associate with an action (or controller and action), the order of execution cannot be predicted. In this case use to define the order of execution. Contract for builders Builds the transform filter descriptors. Constructs a TransformFilterAttribute associating the transformfilter type. The transformfilter implementation Implementation of . Returns the descriptor for this filter association. Gets the type of the transform filter. The type of the transform filter. Gets or sets the execution order. The execution order. Decorates a to associate a custom name with it. Optionally you can associate the section names supported by the . Initializes a new instance of the class. The specified ViewComponent's Name The component's name Sets the nested sections that this supports. The nested sections names, comma separated. Decorates a public property in a to have the framework automatically bind the value using the dictionary. By default The property name is going to be used as a key to query the params. You can also use the property to define that a property is non-optional. Initializes a new instance of the class. Initializes a new instance of the class allowing you to override the parameter name to be queried on the dictionary. Overrides the name of the parameter. Gets or sets a value indicating whether a value for this property is required. true if required; otherwise, false. Gets the name of the param. The name of the param. Represents the controller node configuration Used by configurable elements Deserializes the specified section. The section. Deserializes the specified section. The section. Gets or sets the assemblies. The assemblies. Gets or sets the custom controller factory. The custom controller factory. Represents a url mapping Initializes a new instance of the class. Initializes a new instance of the class. The URL. The controller. The action. The area. Deserializes the specified section. The section. Gets the URL. The URL. Gets the controller. The controller. Gets the action. The action. Gets the area. The area. Represents a set of url mappings Deserializes the specified section. The section. Represents a MonoRail extension configuration entry Deserializes the specified section. The section. Gets or sets the type of the extension. The type of the extension. Gets or sets the extension node. The extension node. Represents a set of MonoRail extensions Deserializes the specified section. The section. Gets the at the specified index. Represents the MonoRail external configuration Initializes a new instance of the class. Pendent Gets the config. Deserializes the specified node. The node. Gets the SMTP config. The SMTP config. Gets the view engine config. The view engine config. Gets the controllers config. The controllers config. Gets the view components config. The view components config. Gets the routing rules. The routing rules. Gets the extension entries. The extension entries. Gets the service entries. The service entries. Gets the custom filter factory. The custom filter factory. Gets the scaffold config. The scaffold config. Gets a value indicating whether MR should check for client connection. true if it should check client is connected; otherwise, false. Gets a value indicating whether to use windsor integration. true if it should use windsor integration; otherwise, false. Gets a value indicating whether match host name and path should be used on MonoRail routing. true if it should match host name and path; otherwise, false. Gets a value indicating whether routing should exclude app path. true if exclude app path; otherwise, false. Gets the configuration section. The configuration section. Gets the default urls. The default urls. The MonoRail section handler Initializes a new instance of the class. Creates a configuration section handler. Configuration context object. The created section handler object. Deserializes the config section. The section. The config. Represents a url routing rule. Initializes a new instance of the class. The regular expression pattern. The replace. Gets the pattern. The pattern. Gets the replace. The replace. Gets the compiled rule. The compiled rule. Represents a set of url routing rules. Deserializes the specified section. The section. Gets the at the specified index. Represents the Scaffolding support configuration. Deserializes the configuration section looking for a 'scaffold' element with a 'type' attribute The section. Gets the scaffolding support implementation type. The type of the scaffold impl. Enum for all known MonoRail services. Custom ( not know service ) The service The service The service. The service. The service. The service The service The service The service The service The service The service The service The service The service The service The service The service The service The service The service The service The service The service The service Represents a MonoRail service entry Deserializes the specified section. The section. Gets the type of the service. The type of the service. Gets the service. The service. Gets the interface. The interface. Represents a set of MonoRail services entries Initializes a new instance of the class. Deserializes the specified section. The section. Registers the service. The id. The service. Registers the service. The inter. The service. Gets the service. The id. Determines whether it has service. The id. true if the specified id has service; otherwise, false. Gets the custom services. The custom services. Gets the service impl map. The service impl map. Represents the SMTP configuration on the configuration file Deserializes the specified smtp section. The smtp section. Gets or sets the smtp host. The host. Gets or sets the smtp port. The port. Gets or sets the smtp username. The username. Gets or sets the smtp password. The password. Hack to allow MR to work when the main assemblies are on GAC. This method returns the complete name. Represents the view components node configuration Deserializes the specified section. The section. Gets or sets the assemblies. The assemblies. Gets or sets the custom view component factory. The custom view component factory. Represents the view engines configuration Deserializes the specified section. The section. Configures the default view engine. Gets or sets the view path root. The view path root. Gets the view engines. The view engines. Gets or sets the additional assembly sources. The sources. Buit in containing the files requireds by helpers and other parts of MonoRail. Implements the core functionality and exposes the common methods for concrete controllers. Holds the request/context information The reference to the instance Logger instance. Should never be null Holds information to pass to the view The area name which was used to access this controller The controller name which was used to access this controller The view name selected to be rendered after the execution of the action The layout name that the view engine should use The original action requested True if any Controller.Send operation was called. The helper instances collected The resources associated with this controller Reference to the instance Constructs a Controller Specifies the view to be processed after the action has finished its processing. view template name (the file extension is optional) Specifies the view to be processed after the action has finished its processing. view template name (the file extension is optional) If set to true, no layout will be used when rendering the view Specifies the view to be processed after the action has finished its processing. view template name (the file extension is optional) If set to true, no layout will be used when rendering the view The mime type to use on the reply Specifies the view to be processed after the action has finished its processing. Controller name get view from (if you intend to user another controller's view view template name (the file extension is optional) Specifies the view to be processed after the action has finished its processing. Controller name get view from (if you intend to user another controller's view view template name (the file extension is optional) If set to true, no layout will be used when rendering the view Specifies the view to be processed after the action has finished its processing. Controller name get view from (if you intend to user another controller's view view template name (the file extension is optional) If set to true, no layout will be used when rendering the view The mime type to use on the reply Specifies the view to be processed after the action has finished its processing. Controller name get view from (if you intend to user another controller's view view template name (the file extension is optional) The mime type to use on the reply Specifies the view to be processed and results are written to System.IO.TextWriter. The name of the view to process. Specifies the shared view to be processed after the action has finished its processing. (A partial view shared by others views and usually in the root folder of the view directory). Specifies the shared view to be processed after the action has finished its processing. (A partial view shared by others views and usually in the root folder of the view directory). Specifies the shared view to be processed and results are written to System.IO.TextWriter. (A partial view shared by others views and usually in the root folder of the view directory). The name of the view to process. Cancels the view processing. Cancels the layout processing. Cancels the view processing and writes the specified contents to the browser Cancels the view processing and writes the specified contents to the browser Cancels the view processing and writes the specified contents to the browser Sends raw contents to be rendered directly by the view engine. It's up to the view engine just to apply the layout and nothing else. Contents to be rendered. Returns true if the specified template exists. Redirects to another action in the same controller. The action name Redirects to another action in the same controller. The action name list of key/value pairs. Each string is supposed to have the format "key=value" that will be converted to a proper query string Redirects to another action in the same controller. The action name Query string entries Redirects to another action in the same controller. The action name Query string entries Redirects to the referrer action, according to the "HTTP_REFERER" header (Context.UrlReferrer). Redirects to the referrer action, according to the "HTTP_REFERER" header (Context.UrlReferrer). Redirects to the site root directory (Context.ApplicationPath + "/"). Redirects to the specified URL. All other Redirects call this one. Target URL Redirects to the specified URL. Target URL URL parameters Redirects to the specified URL. Target URL URL parameters Redirects to another controller and action. Controller name Action name Redirects to another controller and action. Area name Controller name Action name Redirects to another controller and action with the specified paramters. Controller name Action name Key/value pairings Redirects to another controller and action with the specified paramters. Area name Controller name Action name Key/value pairings Redirects to another controller and action with the specified paramters. Controller name Action name Key/value pairings Redirects to another controller and action with the specified paramters. Area name Controller name Action name Key/value pairings Creates a querystring string representation of the namevalue collection. The parameters. Creates a querystring string representation of the entries in the dictionary. The parameters. Extracts the services the controller uses from the context -- which ultimately is a service provider. The context/service provider. Initializes the state of the controller. Name of the area. Name of the controller. Name of the action. Sets the evaluated action. Name of the action. Performs the specified action, which means:
1. Define the default view name
2. Run the before filters
3. Select the method related to the action name and invoke it
4. On error, execute the rescues if available
5. Run the after filters
6. Invoke the view engine
Action name
Performs the specified action with arguments. Action name Action arguments Performs the specified action, which means:
1. Define the default view name
2. Run the before filters
3. Select the method related to the action name and invoke it
4. On error, execute the rescues if available
5. Run the after filters
6. Invoke the view engine
Action name Action arguments
Gives a chance to subclasses to format the action name properly Raw action name Properly formatted action name To preserve standard Action semantics when using ASP.NET Views, the event handlers in the CodeBehind typically call . As a result, the property must be logically cleared to allow the Action to behave as if it was called directly. Pendent Pendent Pendent Initializes this instance. Implementors can use this method to perform initialization Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. Creates the default validator runner. The validator registry. You can override this method to create a runner with some different configuration Invoked by the view engine to perform any logic before the view is sent to the client. Invoked by the view engine to perform any logic after the view had been sent to the client. Creates an instance of using the specified template for the body Name of the template to load. Will look in Views/mail for that template file. An instance of Creates an instance of using the specified template for the body Name of the template to load. Will look in Views/mail for that template file. If true, it will skip the layout An instance of Attempts to deliver the Message using the server specified on the web.config. The instance of System.Web.Mail.MailMessage that will be sent Renders and delivers the e-mail message. Gets the view folder -- (areaname + controllername) or just controller name -- that this controller will use by default. This is intended to be used by MonoRail infrastructure. Gets the actions available in this controller. It is supposed to be used by MonoRail infrastructure only The actions. Gets a dicitionary of name/ It is supposed to be used by MonoRail infrastructure only The resources. Gets a dictionary of name/helper instance The helpers. Gets a value indicating whether the request is a post. if this request is a post; otherwise, . Gets a value indicating whether the request is a get. if this request is a get; otherwise, . Gets a value indicating whether the request is a put. if this request is a put; otherwise, . Gets a value indicating whether the request is a head. if this request is a head; otherwise, . Gets the controller's name. Gets the controller's area name. Gets or set the layout being used. Gets the name of the action being processed. Logger for the controller Gets or sets the view which will be rendered by this action. Gets the property bag, which is used to pass variables to the view. Gets the context of this request execution. Gets the Session dictionary. Gets a dictionary of volative items. Ideal for showing success and failures messages. Gets the web context of ASP.NET API. Gets the request object. Gets the response object. Shortcut to Shortcut to Shortcut to Gets the dynamic actions dictionary. Can be used to insert dynamic actions on the controller instance. The dynamic actions dictionary. Gets the validator runner instance. The validator instance. Gets the URL builder instance. The URL builder. Shortcut to Indicates that the current Action resulted from an ASP.NET PostBack. As a result, this property is only relavent to controllers using WebForms views. It is placed on the base Controller for convenience only to avoid the need to extend the Controller or provide additional helper classes. It is marked virtual to better support testing. Gets the service provider. The service provider. Script used by . Script used by . Script used by . Script used by . Script used by . Script used by . Script used by . Script used by . Install the zebda validation script Script used by . Provides a basic implementation of Represents a processor of an exception. The processor might choose to register the exception in some specific way and then delegate the execution to the next handler Implementors should perform any required initialization Implementors should perform the action on the exception. Note that the exception is available in The next exception in the sink or null if none exists. Implementors should perform any required initialization Implementors should perform the action on the exception. Note that the exception is available in Invokes the next handler. The context. Builds the standard message. The context. The next exception in the sink or null if none exists. A handle that sends the exception by email Extends providing an method that is invoked by the framework. Implementors should check for known attributes and child nodes within the exceptionHandlerNode The Xml node that represents this handler on the configuration file Implementors should check for known attributes and child nodes within the exceptionHandlerNode The Xml node that represents this handler on the configuration file Implementors should perform the action on the exception. Note that the exception is available in This extension allow one to perform one or more steps in response to an exception threw by an action. To successfully install this extension you must register it on the extensions node and the handlers within the exception node: <monorail> <extensions> <extension type="Castle.MonoRail.Framework.Extensions.ExceptionChaining.ExceptionChainingExtension, Castle.MonoRail.Framework" /> </extensions> <exception> <exceptionHandler type="Type name that implements IExceptionHandler" /> <exceptionHandler type="Type name that implements IExceptionHandler" /> </exception> </monorail> Controllers can request IExceptionProcessor through IServiceProvider and invoke the handlers to process an exception (); exProcessor.ProcessException(ex); RenderView("CouldNotBuyMercedes"); } } ]]> Contract for extensions that want to hook on MonoRail's events Extensions implementations must be thread safe and stateless. Gives to the extension implementor a chance to read attributes and child nodes of the extension node The node that defines the MonoRail extension Provides an interface to the ExceptionChaingingExtension for manual triggering Initiates the ExceptionChainingExtension manualy The exception to process Gives to the extension implementor a chance to read attributes and child nodes of the extension node The node that defines the MonoRail extension Services the specified provider. The provider. Initiates the ExceptionChainingExtension manualy The exception to process Called when an exception happens. The context. Installs the exception handler. The node. Name of the type. This class expects to be configured with exclude types that detail the types of exceptions to be ignored. Implementors should check for known attributes and child nodes within the exceptionHandlerNode The Xml node that represents this handler on the configuration file Implementors should perform the action on the exception. Note that the exception is available in Handles that logs the exception using the the logger factory. Implementors should perform the action on the exception. Note that the exception is available in This extension allow one to provide a custom implementation of the session available on To successfully install this extension you must add the attribute customSession to the monoRail configuration node and register the extension on the extensions node. <monoRail customSession="Type name that implements ICustomSessionFactory"> <extensions> <extension type="Castle.MonoRail.Framework.Extensions.Session.CustomSessionExtension, Castle.MonoRail.Framework" /> </extensions> </monoRail> Reference to an instance of obtained from the configuration Gives to the extension implementor a chance to read attributes and child nodes of the extension node The node that defines the MonoRail extension Services the specified provider. The provider. Reads the attribute customSession from and instantiate it based on the type name provided. If the typename was not provided or the type could not be instantiated/found The Extension Manager The configuration Overrides the ISession instance on . Note that the session available through IHttpContext is left untouched Retrives the ISession instance from . and invokes Contract used by to obtain the session implementation provided by the programmer Should identify the session using the context (usually a cookie is used for that) Should persist the session state associated with the context (again, a cookie is the standard approach to identify the session) MonoRail's extension manager. It fires events related to MonoRail that can be used to add additional behaviour. Initializes a new instance of the class. The service container. Gets the service container. The service container. Occurs when a context is created. Occurs when a context is disposed. Occurs when an action throws an exception. Occurs when an unhandled exception is thrown. Occurs when a session is adquired. Occurs when a session is released. Occurs before pre process a handler. Occurs after process a handler. Occurs when a request needs to authenticate. Occurs when a request needs to be authorized. Occurs upon request cache resolval. Occurs when a cache need to be updated. Pendent Dictates the contract for filters. Implementors should use filter to perform any logic before and/or after the action invocation. Implementors should perform they filter logic and return true if the action should be processed. When this filter is being invoked Current context The controller instance true if the action should be invoked, otherwise false Implementors should perform they filter logic and return true if the action should be processed. When this filter is being invoked Current context The controller instance true if the action should be invoked, otherwise false Enum to identify where a value is stored. Value is stored in the Session object. Value is stored in a cookie object. Value is stored in the querystring. Value is stored in the form collection. Value is stored in either query string or form collection. The LocalizationFilter can be used to determine the culture to use for resources and UI. Dictates a contract that the defining FilterAttribute can be set Sets the filter. The filter. Executes a sequence of steps to determine the browser location/culture. When this filter is being invoked Current context The controller instance true if the action should be invoked, otherwise false Gets the user language. The request. Gets the locale id. The context. Sets the filter. The filter. Persist entire flash content after an action execution on the controller. Implementors should perform they filter logic and return true if the action should be processed. When this filter is being invoked Current context The controller instance true if the action should be invoked, otherwise false Forces ASP.Net to perform a more complete request validation Initializes a new instance of the class. When this filter is being invoked Current context The controller instance true if the action should be invoked, otherwise false Implementation of a browser validator that uses the fValidate javascript library. Abstracts the approach to create javascript validation for forms. Implementors should attempt to read their specific configuration from the , configure and return a class that extends from An instance that extends from Implementors should return their generator instance. A generator instance Implementors should attempt to read their specific configuration from the , configure and return a class that extends from An instance that extends from Implementors should return their generator instance. A generator instance Supported configuration for fValidate. Configures the JS library based on the supplied parameters. The parameters. Generator for fValidate validation. Initializes a new instance of the class. Type of the input. The attributes. Sets that a field is required. The target name (ie, a hint about the controller being validated) The violation message. Sets that a field value must match the specified regular expression. The target name (ie, a hint about the controller being validated) The reg exp. The violation message. Sets that a field value must be a valid email address. The target name (ie, a hint about the controller being validated) The violation message. Set that a field should only accept digits. The target name (ie, a hint about the controller being validated) The violation message. Set that a field should only accept numbers. The target name (ie, a hint about the controller being validated) The violation message. Sets that field must have an exact lenght. The target name (ie, a hint about the controller being validated) The length. Sets that field must have an exact lenght. The target name (ie, a hint about the controller being validated) The length. The violation message. Sets that field must have an minimum lenght. The target name (ie, a hint about the controller being validated) The minimum length. Sets that field must have an minimum lenght. The target name (ie, a hint about the controller being validated) The minimum length. The violation message. Sets that field must have an maximum lenght. The target name (ie, a hint about the controller being validated) The maximum length. Sets that field must have an maximum lenght. The target name (ie, a hint about the controller being validated) The maximum length. The violation message. Sets that field must be between a length range. The target name (ie, a hint about the controller being validated) The minimum length. The maximum length. Sets that field must be between a length range. The target name (ie, a hint about the controller being validated) The minimum length. The maximum length. The violation message. Sets that field must be between a value range. The target name (ie, a hint about the controller being validated) Minimum value. Maximum value. The violation message. Sets that field must be between a value range. The target name (ie, a hint about the controller being validated) Minimum value. Maximum value. The violation message. Sets that field must be between a value range. The target name (ie, a hint about the controller being validated) Minimum value. Maximum value. The violation message. Sets that field must be between a value range. The target name (ie, a hint about the controller being validated) Minimum value. Maximum value. The violation message. Set that a field value must be the same as another field's value. The target name (ie, a hint about the controller being validated) The name of the field to compare with. The violation message. Set that a field value must _not_ be the same as another field's value. The target name (ie, a hint about the controller being validated) The name of the field to compare with. The violation message. Set that a field value must be a valid date. The target name (ie, a hint about the controller being validated) The violation message. Adds the validator. The target. The validator. Implements support for really easy field validation http://tetlaw.id.au/view/javascript/really-easy-field-validation Implementors should attempt to read their specific configuration from the , configure and return a class that extends from An instance that extends from Implementors should return their generator instance. A generator instance Configuration for the Prototype Field Validation Implementors should return any tag/js content to be rendered after the form tag is closed. The form id. Configures the JS library based on the supplied parameters. The parameters. Adds a custom rule. Name of the class. The violation message. The rule. Generator for prototype field validation Initializes a new instance of the class. Validation configuration instance Type of the input. The attributes. Sets that a field is required. The target name (ie, a hint about the controller being validated) The violation message. Set that a field should only accept digits. The target name (ie, a hint about the controller being validated) The violation message. Set that a field should only accept numbers. The target name (ie, a hint about the controller being validated) The violation message. Sets that a field value must be a valid email address. The target name (ie, a hint about the controller being validated) The violation message. Sets that a field value must match the specified regular expression. The target name (ie, a hint about the controller being validated) The reg exp. The violation message. Sets that field must have an exact lenght. The target name (ie, a hint about the controller being validated) The length. Sets that field must have an exact lenght. The target name (ie, a hint about the controller being validated) The length. The violation message. Sets that field must have an minimum lenght. The target name (ie, a hint about the controller being validated) The minimum length. Sets that field must have an minimum lenght. The target name (ie, a hint about the controller being validated) The minimum length. The violation message. Sets that field must have an maximum lenght. The target name (ie, a hint about the controller being validated) The maximum length. Sets that field must have an maximum lenght. The target name (ie, a hint about the controller being validated) The maximum length. The violation message. Sets that field must be between a length range. The target name (ie, a hint about the controller being validated) The minimum length. The maximum length. Sets that field must be between a length range. The target name (ie, a hint about the controller being validated) The minimum length. The maximum length. The violation message. Sets that field must be between a value range. The target name (ie, a hint about the controller being validated) Minimum value. Maximum value. The violation message. Sets that field must be between a value range. The target name (ie, a hint about the controller being validated) Minimum value. Maximum value. The violation message. Sets that field must be between a value range. The target name (ie, a hint about the controller being validated) Minimum value. Maximum value. The violation message. Sets that field must be between a value range. The target name (ie, a hint about the controller being validated) Minimum value. Maximum value. The violation message. Set that a field value must be the same as another field's value. The target name (ie, a hint about the controller being validated) The name of the field to compare with. The violation message. Set that a field value must _not_ be the same as another field's value. The target name (ie, a hint about the controller being validated) The name of the field to compare with. The violation message. Set that a field value must be a valid date. The target name (ie, a hint about the controller being validated) The violation message. Provides an interface for the Zebda client side JS validator http://labs.cavorite.com/zebda Read the configuration Pendent Configuration for the Zebda validation Render the validation init script read the validator configuration values The generator for the Zebda JS validator Initializes a new instance of the class. Type of the input. The attributes. Set that a field should only accept digits. The target name (ie, a hint about the controller being validated) The violation message. Set that a field should only accept numbers. The target name (ie, a hint about the controller being validated) The violation message. Sets that a field is required. The target name (ie, a hint about the controller being validated) The violation message. Sets that a field value must match the specified regular expression. The target name (ie, a hint about the controller being validated) The reg exp. The violation message. Sets that a field value must be a valid email address. The target name (ie, a hint about the controller being validated) The violation message. Sets that field must have an exact lenght. The target name (ie, a hint about the controller being validated) The length. Sets that field must have an exact lenght. The target name (ie, a hint about the controller being validated) The length. The violation message. Sets that field must have an minimum lenght. The target name (ie, a hint about the controller being validated) The minimum length. Sets that field must have an minimum lenght. The target name (ie, a hint about the controller being validated) The minimum length. The violation message. Sets that field must have an maximum lenght. The target name (ie, a hint about the controller being validated) The maximum length. Sets that field must have an maximum lenght. The target name (ie, a hint about the controller being validated) The maximum length. The violation message. Sets that field must be between a length range. The target name (ie, a hint about the controller being validated) The minimum length. The maximum length. Sets that field must be between a length range. The target name (ie, a hint about the controller being validated) The minimum length. The maximum length. The violation message. Sets that field must be between a value range. The target name (ie, a hint about the controller being validated) Minimum value. Maximum value. The violation message. Sets that field must be between a value range. The target name (ie, a hint about the controller being validated) Minimum value. Maximum value. The violation message. Sets that field must be between a value range. The target name (ie, a hint about the controller being validated) Minimum value. Maximum value. The violation message. Sets that field must be between a value range. The target name (ie, a hint about the controller being validated) Minimum value. Maximum value. The violation message. Set that a field value must be the same as another field's value. The target name (ie, a hint about the controller being validated) The name of the field to compare with. The violation message. Set that a field value must _not_ be the same as another field's value. The target name (ie, a hint about the controller being validated) The name of the field to compare with. The violation message. Set that a field value must be a valid date. The target name (ie, a hint about the controller being validated) The violation message. Optional base class for helpers. Extend from this class only if your helpers needs a reference to the controller which is using it or if you need to use one of the protected utility methods. Implemented by the view or helpers, if they desire to have access to the controller instance. Sets the controller. The controller. Store's for the current view. Sets the controller. Current view's . Merges with placing results in . The user options. The default options. All and in are copied to . Entries with the same in and are skipped. Renders the a script block with a src attribute pointing to the url. The url must not have an extension. For example, suppose you invoke it like: RenderScriptBlockToSource("/my/url/to/my/scripts"); That will render ]]> As you see the file extension will be inferred The url for the scripts (should start with a '/') An script block pointing to the given url. Renders the a script block with a src attribute pointing to the url sending the querystring as parameter. The url must not have an extension. For example, suppose you invoke it like: RenderScriptBlockToSource("/my/url/to/my/scripts", "locale=pt-br"); That will render ]]> As you see the file extension will be inferred The url for the scripts (should start with a '/') The query string. An script block pointing to the given url. Generates HTML element attributes string from . key1="value1" key2 The attributes for the element. to use inside HTML element's tag. is returned if is null or empty. If for some is null or only attribute name is appended to the string. Builds a query string encoded. Supports multi-value query strings, using any as a value. IDictionary dict = new Hashtable(); dict.Add("id", 5); dict.Add("selectedItem", new int[] { 2, 4, 99 }); string querystring = BuildQueryString(dict); // should result in: "id=5&selectedItem=2&selectedItem=4&selectedItem=99&" The parameters Concat two string in a query string format (key=value&key2=value2) building a third string with the result key values key values The concatenation result HTML encodes a string and returns the encoded string. The text string to HTML encode. The HTML encoded text. Escapes a content replacing line breaks with html break lines. The text to escape. The URL encoded and JavaScript escaped text. URL encodes a string and returns the encoded string. The text to URL encode. The URL encoded text. URL encodes the path portion of a URL string and returns the encoded string. The text to URL encode. The URL encoded text. Escapes JavaScript with Url encoding and returns the encoded string. Converts quotes, single quotes and CR/LFs to their representation as an escape character. The text to URL encode and escape JavaScript within. The URL encoded and JavaScript escaped text. Builds a JS associative array based on the specified dictionary instance. For example: {name: value, other: 'another'} The js options. An associative array in javascript Generates script block. <script type=\"text/javascript\"> scriptContents </script> The script contents. placed inside script tags. Quotes the specified string with double quotes The content. A quoted string Quotes the specified string with singdoublele quotes Items to quote A quoted string Quotes the specified string with double quotes The content. A quoted string Gets the controller. The used with the current view. Gets or sets the server utility. The server utility. Gets the URL helper instance. The URL helper. Gets the current context. The current context. XmlHttpRequest supported events. Not initialized Called when the remote document is being loaded with data by the browser. Called when the browser has finished loading the remote document. Called when the user can interact with the remote document, even though it has not finished loading. Called when the XMLHttpRequest has completed. Called when the request was successfully (Status code < 500) Called when the request was not successfully (Status code >= 500) MonoRail Helper that delivers AJAX capabilities. The following libraries are exposed: Prototype Simplify ajax programming, among other goodies Behaviour Uses css selectors to bind javascript code to DOM elements Invoked by the framework in order to give a chance to obtain other services The service proviver Renders a Javascript library inside a single script tag. Renders a Javascript library inside a single script tag. Generates an AJAX JavaScript proxy for the current controller. Name of the javascript proxy object Generates an AJAX JavaScript proxy for a given controller. Name of the javascript proxy object Controller which will be target of the proxy Generates an AJAX JavaScript proxy for a given controller. Name of the javascript proxy object Controller which will be target of the proxy area which the controller belongs to Returns a link that will trigger a javascript function using the onclick handler and return false after the fact. <a href="javascript:void(0);" onclick="functionCodeOrName; return false">innerContent</a> Link content Function definition Attributes to be applied to the html element Returns a link that will trigger a javascript function using the onclick handler and return false after the fact. <a href="javascript:void(0);" onclick="confirm('question') { functionCodeOrName}; return false">innerContent</a> Link content Function definition Confirm question Attributes to be applied to the html element Returns a link that will trigger a javascript function using the onclick handler and return false after the fact. Link content Function definition Returns a link that will trigger a javascript function using the onclick handler and return false after the fact. Link content Function definition Confirm question Returns a button that will trigger a javascript function using the onclick handler and return false after the fact. Button legend Function definition or name Attributes to be applied to the input html element Returns a button that will trigger a javascript function using the onclick handler and return false after the fact. Button legend Function definition or name Creates a button that if clicked will fire an Ajax invocation. Button legend The URL of the Ajax action the options for the Ajax invocation The handcrafted input Creates a button that if clicked will fire an Ajax invocation. Button legend the target url the options for the Ajax invocation Attributes to be applied to the html element The handcrafted input Returns a link to a remote action defined by options["url"] that is called in the background using XMLHttpRequest. The result of that request can then be inserted into a DOM object whose id can be specified with options["update"]. Usually, the result would be a partial prepared by the controller Link content Target url the options for the Ajax invocation The handcrafted element Returns a link to a remote action defined by options["url"] that is called in the background using XMLHttpRequest. The result of that request can then be inserted into a DOM object whose id can be specified with options["update"]. Usually, the result would be a partial prepared by the controller Link content the confirm question Target url the options for the Ajax invocation The handcrafted element Returns a link to a remote action defined by options["url"] that is called in the background using XMLHttpRequest. The result of that request can then be inserted into a DOM object whose id can be specified with options["update"]. Usually, the result would be a partial prepared by the controller Link content Target url the options for the Ajax invocation Attributes to be applied to the html element The handcrafted element Returns a form tag that will submit using XMLHttpRequest in the background instead of the regular reloading POST arrangement. Even though it is using Javascript to serialize the form elements, the form submission will work just like a regular submission as viewed by the receiving side (all elements available). Target url the options for the Ajax invocation The handcrafted element Returns a form tag that will submit using XMLHttpRequest in the background instead of the regular reloading POST arrangement. Even though it is using Javascript to serialize the form elements, the form submission will work just like a regular submission as viewed by the receiving side (all elements available). the options for the Ajax invocation The handcrafted element Observes the field with the DOM ID specified by fieldId and makes an Ajax when its contents have changed. Form field to be observed The frequency (in seconds) at which changes to this field will be detected. (required) url for the action to call when the field has changed (required) Specifies the DOM ID of the element whose innerHTML should be updated with the XMLHttpRequest response text. A Javascript expression specifying the parameters for the XMLHttpRequest. This defaults to 'value', which in the evaluated context refers to the new field value. javascript that activates the observer Observes the field with the DOM ID specified by fieldId and makes an Ajax when its contents have changed. Form field to be observed The frequency (in seconds) at which changes to this field will be detected. (required) url for the action to call when the field has changed (required) the options for the Ajax invocation javascript that activates the observer Observes the field with the DOM ID specified by field and makes an Ajax call when its contents changes. The following entries must exist in the dictionary: field The DOM field to be observed url url to to call when the field has changed frequency The frequency (in seconds) at which changes to this field will be detected The following are optional entries: update Specifies the DOM ID of the element whose innerHTML should be updated with the XMLHttpRequest response text with A Javascript expression specifying the parameters for the XMLHttpRequest. This defaults to 'value', which in the evaluated context refers to the new field value the options for the Ajax invocation javascript that activates the observer Like , but operates on an entire form identified by the DOM ID formId. options are the same as , except the default value of the :with option evaluates to the serialized (request String) value of the form. Works like the , but operates on an entire form identified by the DOM ID formId. Options are the same as , except the default value of the with option evaluates to the serialized (request String) value of the entire form. Form to be observed The frequency (in seconds) at which changes to this field will be detected. (required) url for the action to call when the field has changed (required) Specifies the DOM ID of the element whose innerHTML should be updated with the XMLHttpRequest response text. A Javascript expression specifying the parameters for the XMLHttpRequest. This defaults to 'value', which in the evaluated context refers to the new field value. javascript that activates the observer Like , but operates on an entire form identified by the DOM ID formId. options are the same as , except the default value of the with option evaluates to the serialized (request String) value of the entire form. Form to be observed the options for the Ajax invocation javascript that activates the observer Observes all elements within a form with the DOM ID specified by form and makes an Ajax call when its contents changes. The following entries must exist in the dictionary: form The form element id url url to to call when the field has changed frequency The frequency (in seconds) at which changes to this field will be detected The following are optional entries: update Specifies the DOM ID of the element whose innerHTML should be updated with the XMLHttpRequest response text with A Javascript expression specifying the parameters for the XMLHttpRequest. This defaults to 'value', which in the evaluated context refers to the new field value the options for the Ajax invocation javascript that activates the observer Periodically invokes the specified url. You can use the options to override the default frequency (defaults to 10 seconds). the options for the Ajax invocation javascript that activates the timer Periodically invokes the specified url. You can use the options to override the default frequency (defaults to 10 seconds). the options for the Ajax invocation url to be invoked periodically javascript that activates the timer Rendes a input field with Google style autocomplete enabled. The specified url is used to gather the contents for the auto complete panel, so and your action should return filtered and sorted results. The following entries must exist in the options: input The text input element id url url to to call when the field has changed it is assumed that the url invoked returns an unordered list. the options for the Ajax invocation attributes for the input html element javascript that activates the timer Rendes a input field with Google style autocomplete enabled. The specified url is used to gather the contents for the auto complete panel, so and your action should return filtered and sorted results. it is assumed that the url invoked returns an unordered list. input element id url used to gather results attributes for the input element options for the autocomplete Generates an javascript block enabling auto completion for the specified input text id (elementId). You can specify the element to be updated using the options dictionary (key update), if you don't we assume elementId+autocomplete. it is assumed that the url invoked returns an unordered list. The element id (input type=text) The url to be invoked returning results the options for the Ajax invocation Returns a function that makes a remote invocation, using the supplied parameters Target url the options for the Ajax invocation javascript code Returns a function that makes a remote invocation, using the supplied parameters the options for the Ajax invocation javascript code Populates the by analyzing the options set on the helper The following options are analyzed type boolean - sets the asynchronous method string - sets the method. Possible values are post/get evalScripts boolean position string - sets the place where content is inserted (Top, Bottom, After, Before) form if present, set the parameters request to send the current form serialized with if present, set its content as the parameters for the ajax request Options that will be used on the js side Options passed to the helper method Builds the callback function. The callback. The code. The name. Builds the observer. The clazz. The name. The options. Gets the options. The URL. The options. Gets the options. The URL. The id of element to be updated. The with. The loading. The loaded. The complete. The interactive. Exposes the functionality available on the Behaviour js library which Uses css selectors to bind javascript code to DOM elements Before using it, you must install the scripts. See Renders a script tag refering the Behaviour library code. Renders a script block invoking Behaviour.apply() Renders a script block invoking Behaviour.addLoadEvent(loadFunctionName); The name of the js function to be invoked when the body is loaded Renders a script block starting the association of events to selector rules Adds a entry to a registration array. Invoking it with #form, onsubmit and validate will produce '#form' : function(e){ e.onsubmit = validate; }, The css selector rule The name of the event on the element The function to be invoked in response to the event Renders the end of a script block that associated events to selector rules Simple helper for date formatting Alternative representation of a difference between the specified date and now. If within 24hr it returns Today. If within 48hr it returns Yesterday. If within 40 days it returns x days ago and otherwise it returns x months ago TODO: Think about i18n The date in the past (should be equal or less than now) Returns the difference from the specified date the the current date in a friendly string like "1 day ago" TODO: Think about i18n The date in the past (should be equal or less than now) Formats to short date Short date, or String.Empty if is null. Formats to short date Short date and time, or String.Empty if is null. Helper used to create instances Creates an with entries infered from the arguments. CreateDict( "style=display: none;", "selected" ) Creates a dictionary from specified arguments. The arguments. Creates a dictionary fros a name value collection. The collection. Exposes the effect script from Thomas Fuchs (http://script.aculo.us, http://mir.aculo.us) Before using it, you must install the scripts. See Exposes the effect script from Thomas Fuchs (http://script.aculo.us, http://mir.aculo.us) Before using it, you must install the scripts. See Renders a Javascript library inside a single script tag. Gets the javascript functions. Generates a JS snippet invoking the specified effect. Examples: VisualEffect('ToggleSlide', 'elementid') VisualEffect('ToggleBlind', 'elementid') VisualEffect('ToggleAppear', 'elementid') VisualEffect('Highlight', 'elementid') VisualEffect('Fade', 'elementid') VisualEffect('Shake', 'elementid') VisualEffect('DropOut', 'elementid') The effect name. The element id to act upon. A JS snippet Generates a JS snippet invoking the specified effect. Examples: VisualEffect('ToggleSlide', 'elementid') VisualEffect('ToggleBlind', 'elementid') VisualEffect('ToggleAppear', 'elementid') VisualEffect('Highlight', 'elementid') VisualEffect('Fade', 'elementid') VisualEffect('Shake', 'elementid') VisualEffect('DropOut', 'elementid') Common options includes duration, transition, fps, sync, from, to, delay, queue, startcolor, endcolor. Callbacks: beforeStart, beforeUpdate, afterUpdate, afterFinish If you want to use the DropOut effect, please refer to The effect name. The element id to act upon. A dictionary used to specify options to the effect behavior A JS snippet Generates a JS snippet invoking the DropOut effect Examples: VisualEffectDropOut('elementid', {position:'end', scope='test', limit=2}) The element id to act upon. A dictionary used to specify options to the DropOut behavior A JS snippet Make an element appear. If the element was previously set to display:none; inside the style attribute of the element, the effect will automatically show the element. Microsoft Internet Explorer can only set opacity on elements that have a 'layout'. To let an element have a layout, you must set some CSS positional properties, like 'width' or 'height'. Makes an element fade away and takes it out of the document flow at the end of the effect by setting the CSS display property to false. Works safely with most HTML block elements (like DIV and LI). Microsoft Internet Explorer can only set opacity on elements that have a 'layout'. To let an element have a layout, you must set some CSS positional properties, like 'width' or 'height'. Gives the illusion of the element puffing away (like a in a cloud of smoke). Works safely with most HTML block elements (like DIV and LI). Makes the element drop and fade out at the same time. Works safely with most HTML block elements (like DIV and LI). Moves the element slightly to the left, then to the right, repeatedly. Works safely with most HTML block elements (like DIV and LI). Gives the illusion of a TV-style switch off. Works safely with most HTML block elements (like DIV and LI). This pair of effects simulates a window blind, where the contents of the affected elements stay in place. Works safely with most HTML block elements (like DIV and LI), except table rows, table bodies and table heads. This pair of effects simulates a window blind, where the contents of the affected elements stay in place. Works safely with most HTML block elements (like DIV and LI), except table rows, table bodies and table heads. This pair of effects simulates a window blind, where the contents of the affected elements scroll up and down accordingly. You must include a second DIV element, wrapping the contents of the outer DIV. So, if you call new Effect.SlideDown('x'), your element must look like this: <div id="x"><div>contents</div></div> Because of a bug in Internet Explorer 6 (overflow not correctly hidden), an additional wrapper div is needed if you want to use these effects on absolutely positionend elements (wrapper is the absolutely positioned element, x has position:relative; set; ): <div id="wrapper"> <div id="x"><div>contents</div></div> </div> Works only on block elements. This pair of effects simulates a window blind, where the contents of the affected elements scroll up and down accordingly. You must include a second DIV element, wrapping the contents of the outer DIV. So, if you call new Effect.SlideDown('x'), your element must look like this: <div id="x"><div>contents</div></div> Because of a bug in Internet Explorer 6 (overflow not correctly hidden), an additional wrapper div is needed if you want to use these effects on absolutely positionend elements (wrapper is the absolutely positioned element, x has position:relative; set; ): <div id="wrapper"> <div id="x"><div>contents</div></div> </div> Works only on block elements. Just apply the CSS class "fade" to any element and it will fade from yellow to its background color or white if none is specified. Key Features
* Fade an infinite number of elements.
* No inline JavaScript. Simply give an element a class of "fade", the script does the rest "automagically".
* Background color aware. FAT will do better than simply fade to white if the element (or it's parents) have a CSS background color, it will fade to that background color instead.
* Fade from any color. For example, if you wanted a list of error messages to fade out from red you would simply give the list a class of "fade-FF0000".
* Super smooth fading. By default, elements will fade at 30 frames per second (the same rate as a television) over 3 seconds. You can adjust this to any framerate and any duration. You could easily fade elements at 60 frames per second over 4, 5, 10 seconds!
NOTE: All elements to be faded must have an id tag! BASIC USE:

Watch me fade

ADVANCED USE: Change the default fade from color:

Watch me fade from Blue (#0066FF)

SEE MORE HERE: http://www.axentric.com/posts/default/7
Renders a Javascript library inside a single script tag. Renders a Javascript library inside a single script tag. Represents all scopes that the uses to search for root values All scopes should be searched Only PropertyBag should be searched Only Flash should be searched Only Session should be searched Only Request should be searched Only Params should be searched The FormHelper allows you to output html input elements using the conventions necessary to use the DataBinder on the server side. Ultimately it allows you do to a bi-directional binding -- if used properly. Using simple values: On the controller: public void MyAction() { PropertyBag["name"] = "John Doe"; } On the view (using NVelocity syntax) $Form.TextField('name') // Renders an input text with value "John Doe" Using complex objects: public void MyAction() { PropertyBag["user"] = new User("John Doe"); } On the view (using NVelocity syntax) $Form.TextField('user.name') // Renders an input text with value "John Doe" Elements generation
Buttons

Select Text area Hidden field Checkbox field
Radio field File upload Text field


Password field
Labels
FormValidation
The following operations are related to the Form Validation support:
and Opens/close the form tag. They are required to use the form validation Disables validation altogether Sets a custom Browser validator provider Configures the helper to use the prototype easy field validation. Must be invoked before FormTag Configures the helper to use the fValidate. Deprecated. Configures the helper to use the Zebda. Must be invoked before FormTag Mask support.
For most elements, you can use the entries mask and optionally mask_separator to define a mask for your inputs. Kudos to mordechai Sandhaus - 52action.com
For example: mask='2,5',mask_separator='/' will mask the content to '12/34/1234'
Common property flags for reflection Common property flags for reflection (with declared only) Common field flags for reflection Logger instance Invoked by the framework in order to give a chance to obtain other services The service proviver Renders a Javascript library inside a single script tag. Creates a form tag based on the parameters. Javascript validation can also be bound to the form and|or elements nested as long as the helper is able to reach the of the object used on your view code The action attribute generation will use $Form.FormTag("%{action='Save',id='productform'}") Outputs: <form method='post' action='/[appdir]/[controller]/Save.[extension]' id='productform'> The parameters are used to build a url and also to form the tag. For notes on the url see . The other parameters supported follows noaction boolean. Disables the generation of an action method string. The http method to use. Defaults to post id string. The form id. More parameters can be accepted depending on the form validation strategy you are using (if any). The parameters for the tag or for action and form validation generation. Creates a form tag based on the parameters. Javascript validation can also be bound to the form and|or elements nested as long as the helper is able to reach the of the object used on your view code The action attribute generation will use $Form.FormTag('mytarget.castle', "%{id='productform'}") Outputs: <form method='post' action='mytarget.castle' id='productform'> The following parameters are accepted. method string. The http method to use. Defaults to post id string. The form id. More parameters can be accepted depending on the form validation strategy you are using (if any). The hardcoded url. The parameters for the tag or for action and form validation generation. Generate Ajax form tag for ajax based form submission. Experimental. Renders an end form element. Should be used if you are using form validation. Some validation approaches uses the end form before or after appending a javascript snippet. Pushes the specified target. Experimental. The target. Pushes the specified target. Experimental. The target. The parameters. Pops this instance. Experimental. Generates an input submit element. The value/caption for the button. The element tag Generates an input submit element. The value/caption for the button. Attributes for the FormHelper method and for the html element it generates The element tag Generates an input button element. The value. The element tag Generates an input button element. The value. Attributes for the FormHelper method and for the html element it generates The element tag Creates a basic button element of type submit. The inner text of the button element. The generated button element. Creates a basic button element of the specified type. The inner text of the button element. The type of the button. The generated button element. Creates a basic button element of the specified type and with specified attributes. The inner text of the button element. The type of the button. Attributes for the FormHelper method and for the html element it generates The generated button element. Generates an input text form element with the supplied value The string to be used to create the element name. Value to supply to the element (instead of querying the target) The generated form element Generates an input text form element with the supplied value The string to be used to create the element name. Value to supply to the element (instead of querying the target) Attributes for the FormHelper method and for the html element it generates The generated form element Generates an input text element. The value is extracted from the target (if available) The following example assumes that an entry username exists on the or or $Form.TextField('username') Outputs: <input type='text' name='username' id='username' value='John Doe' /> The following example assumes that an entry user exists on the or or $Form.TextField('user.name') Outputs: <input type='text' name='user.name' id='user_name' value='John Doe' /> The object to get the value from and to be based on to create the element name. The generated form element Generates an input text element. The value is extracted from the target (if available) The object to get the value from and to be based on to create the element name. Attributes for the FormHelper method and for the html element it generates The generated form element Generates an input text element with a javascript that prevents the chars listed in the forbid attribute from being entered. You must pass an forbid value through the dictionary. It must be a comma separated list of chars that cannot be accepted on the field. For example: FormHelper.FilteredTextField("product.price", {forbid='46'}) In this case the key code 46 (period) will not be accepted on the field. The value is extracted from the target (if available). The object to get the value from and to be based on to create the element name. Attributes for the FormHelper method and for the html element it generates The generated form element. You must invoke before using it. Generates an input text element with a javascript that prevents chars other than numbers from being entered. The value is extracted from the target (if available) You must include the formhelper javascript functions to use the NumberField. See The object to get the value from and to be based on to create the element name. The generated form element Generates an input text element with a javascript that prevents chars other than numbers from being entered. The value is extracted from the target (if available) The object to get the value from and to be based on to create the element name. Attributes for the FormHelper method and for the html element it generates The generated form element You must include the formhelper javascript functions to use the NumberField. See You can optionally pass an exceptions value through the dictionary. It must be a comma separated list of chars that can be accepted on the field. For example: FormHelper.NumberField("product.price", {exceptions='13,10,11'}) In this case the key codes 13, 10 and 11 will be accepted on the field. You can aslo optionally pass an forbid value through the dictionary. It must be a comma separated list of chars that cannot be accepted on the field. For example: FormHelper.NumberField("product.price", {forbid='46'}) In this case the key code 46 (period) will not be accepted on the field. Generates an input text element with a javascript that prevents chars other than numbers from being entered. The value is not gathered from the context, instead you specify it on the second argument The object to get the value from and to be based on to create the element name. The current value to output. The generated form element You must include the formhelper javascript functions to use the NumberField. See Generates an input text element with a javascript that prevents chars other than numbers from being entered. The value is not gathered from the context, instead you specify it on the second argument The object to get the value from and to be based on to create the element name. The current value to output. Attributes for the FormHelper method and for the html element it generates The generated form element You must include the formhelper javascript functions to use the NumberField. See Generates a textarea element. The value is extracted from the target (if available) The object to get the value from and to be based on to create the element name. The generated form element Generates a textarea element. The value is extracted from the target (if available) The object to get the value from and to be based on to create the element name. Attributes for the FormHelper method and for the html element it generates The generated form element Generates a textarea element with a specified value. The target to base the element name on. The value to apply to the field. Attributes for the FormHelper method and for the html element it generates The generated form element Generates a password input field. The object to get the value from and to be based on to create the element name. The generated form element Generates a password input field. The object to get the value from and to be based on to create the element name. Attributes for the FormHelper method and for the html element it generates The generated form element Generates an input password element with a javascript that prevents chars other than numbers from being entered. The value is extracted from the target (if available) You must invoke before using it The object to get the value from and to be based on to create the element name. The generated form element Generates an input password element with a javascript that prevents chars other than numbers from being entered. The value is extracted from the target (if available) You can optionally pass an exceptions value through the dictionary. It must be a comma separated list of chars that can be accepted on the field. For example: FormHelper.NumberField("product.price", {exceptions='13,10,11'}) In this case the key codes 13, 10 and 11 will be accepted on the field. You can aslo optionally pass an forbid value through the dictionary. It must be a comma separated list of chars that cannot be accepted on the field. For example: FormHelper.NumberField("product.price", {forbid='46'}) In this case the key code 46 (period) will not be accepted on the field. You must invoke before using it The object to get the value from and to be based on to create the element name. Attributes for the FormHelper method and for the html element it generates The generated form element Generates a label element. The object to get the value from and to be based on to create the element name. Legend The generated form element Generates a label element. The object to get the value from and to be based on to create the element name. Legend Attributes for the FormHelper method and for the html element it generates The generated form element Generates a hidden form element. The value is extracted from the target (if available) The object to get the value from and to be based on to create the element name. The generated form element Generates a hidden form element with the specified value The object to get the value from and to be based on to create the element name. The value for the hidden field The generated form element Generates a hidden form element. The value is extracted from the target (if available) The object to get the value from and to be based on to create the element name. Attributes for the FormHelper method and for the html element it generates The generated form element Generates a hidden form element with the specified value The object to get the value from and to be based on to create the element name. The value for the hidden field Attributes for the FormHelper method and for the html element it generates The generated form element Creates a instance which is enumerable. For each interaction you can invoke which will correctly render a checkbox input element for the current element on the supplied set (dataSource). The enumerable item will be an element of the dataSource. If the dataSource elements are complex objects (ie not string or primitives), supply the parameters value and text to the dictionary to make the helper use the specified properties to extract the option value and content respectively. Usually both the target and obviously the dataSource are sets with multiple items. The element types tend to be the same. If they are not, you might have to specify the suffix parameters on the attributes as it would not be inferred. Consider the following action code: public void Index() { // data source PropertyBag["primenumbers"] = new int[] { 2, 3, 5, 7, 11, 13, 17, 19, 23 }; // initial selection PropertyBag["selectedPrimes"] = new int[] { 11, 19 }; } And the respective view code #set($items = $FormHelper.CreateCheckboxList("selectedPrimes", $primenumbers)) #foreach($elem in $items) $items.Item() $elem #end That will generates the following html: <input type="checkbox" id="selectedPrimes_0_" name="selectedPrimes[0]" value="2" /> 2 <input type="checkbox" id="selectedPrimes_1_" name="selectedPrimes[1]" value="3" /> 3 <input type="checkbox" id="selectedPrimes_2_" name="selectedPrimes[2]" value="5" /> 5 <input type="checkbox" id="selectedPrimes_3_" name="selectedPrimes[3]" value="7" /> 7 <input type="checkbox" id="selectedPrimes_4_" name="selectedPrimes[4]" value="11" checked="checked" /> 11 <input type="checkbox" id="selectedPrimes_5_" name="selectedPrimes[5]" value="13" /> 13 <input type="checkbox" id="selectedPrimes_6_" name="selectedPrimes[6]" value="17" /> 17 <input type="checkbox" id="selectedPrimes_7_" name="selectedPrimes[7]" value="19" checked="checked" /> 19 <input type="checkbox" id="selectedPrimes_8_" name="selectedPrimes[8]" value="23" /> 23 To customize the id, you can call the overload: #set($items = $FormHelper.CreateCheckboxList("selectedPrimes", $primenumbers)) #foreach($elem in $items) $items.Item("myId${velocityCount}") $Form.LabelFor("myId${velocityCount}", $elem.ToString())
#end
The object to get the value from and to be based on to create the element name. The set of available elements The generated form element
Creates a instance which is enumerable. For each interaction you can invoke which will correctly render a checkbox input element for the current element on the supplied set (dataSource). The enumerable item will be an element of the dataSource. If the dataSource elements are complex objects (ie not string or primitives), supply the parameters value and text to the dictionary to make the helper use the specified properties to extract the option value and content respectively. Usually both the target and obviously the dataSource are sets with multiple items. The element types tend to be the same. If they are not, you might have to specify the suffix parameters on the attributes as it would not be inferred. Consider the following action code: public void Index() { Category[] categories = new Category[] { new Category(1, "Music"), new Category(2, "Humor"), new Category(3, "Politics") }; PropertyBag["categories"] = categories; // datasource Blog blog = new Blog(); blog.Categories = new Category[] { new Category(2, "Humor") }; // initial selection PropertyBag["blog"] = blog; } And the respective view code #set($items = $Form.CreateCheckboxList("blog.categories", $categories, "%{value='Id'}")) #foreach($elem in $items) $items.Item() $elem #end That will generates the following html: <input type="checkbox" id="blog_categories_0_" name="blog.categories[0].Id" value="1" /> Music <input type="checkbox" id="blog_categories_1_" name="blog.categories[1].Id" value="2" checked="checked" /> Humor <input type="checkbox" id="blog_categories_2_" name="blog.categories[2].Id" value="3" /> Politics The object to get the value from and to be based on to create the element name. The set of available elements Attributes for the FormHelper method and for the html element it generates The generated form element Outputs a checkbox element (for internal use) The object to get the value from and to be based on to create the element name. Attributes for the FormHelper method and for the html element it generates The generated form element Generates a checkbox field. In fact it generates two as a way to send a value if the primary checkbox is not checked. This allow the process the be aware of the unchecked value and act accordingly. Consider the following view code: $Form.CheckboxField('user.disabled') That is going to output: <input type="checkbox" id="user_disabled" name="user.disabled" value="true" /> <input type="hidden" id="user_disabledH" name="user.disabled" value="false" /> The object to get the value from and to be based on to create the element name. The generated form element Generates a checkbox field. In fact it generates two as a way to send a value if the primary checkbox is not checked. This allow the process the be aware of the unchecked value and act accordingly. The checked and unchecked values sent to the server defaults to true and false. You can override them using the parameters trueValue and falseValue, but the DataBinder is prepared only to treat boolean arrays. The object to get the value from and to be based on to create the element name. Attributes for the FormHelper method and for the html element it generates The generated form element Generates a radio input type with the specified value to send to the served in case the element in checked. It will automatically check the radio if the target evaluated value is equal to the specified valueToSend. Consider the following action code: public void Index() { PropertyBag["mode"] = FileMode.Truncate; } And the following view code: $Form.RadioField("mode", "Append") FileMode.Append $Form.RadioField("mode", "Create") FileMode.Create $Form.RadioField("mode", "CreateNew") FileMode.CreateNew $Form.RadioField("mode", "Open") FileMode.Open $Form.RadioField("mode", "OpenOrCreate", "%{id='customhtmlid'}") FileMode.OpenOrCreate $Form.RadioField("mode", "Truncate") FileMode.Truncate That is going to output: <input type="radio" id="mode" name="mode" value="Append" /> FileMode.Append <input type="radio" id="mode" name="mode" value="Create" /> FileMode.Create <input type="radio" id="mode" name="mode" value="CreateNew" /> FileMode.CreateNew <input type="radio" id="mode" name="mode" value="Open" /> FileMode.Open <input type="radio" id="customhtmlid" name="mode" value="OpenOrCreate" /> FileMode.OpenOrCreate <input type="radio" id="mode" name="mode" value="Truncate" checked="checked" /> FileMode.Truncate The object to get the value from and to be based on to create the element name. The generated form element Generates a radio input type with the specified value to send to the served in case the element in checked. It will automatically check the radio if the target evaluated value is equal to the specified valueToSend. The object to get the value from and to be based on to create the element name. Attributes for the FormHelper method and for the html element it generates The generated form element Generates an input file element. Dirrently than other operations exposed by this helper, no value is extracted for this operation The object to be based on when creating the element name. The generated form element Generates an input file element. Dirrently than other operations exposed by this helper, no value is extracted for this operation The object to be based on when creating the element name. Attributes for the FormHelper method and for the html element it generates The generated form element Creates a select element and its options based on the dataSource. If the dataSource elements are complex objects (ie not string or primitives), supply the parameters value and text to the dictionary to make the helper use the specified properties to extract the option value and content respectively. You can also specify the attribute firstoption to force the first option be something like 'please select'. You can set the value of firstoption by specifying the attribute firstoptionvalue. The default value is '0'. Usually the target is a single value and the dataSource is obviously a set with multiple items. The element types tend to be the same. If they are not, you might have to specify the suffix parameters on the attributes as it would not be inferred. The target can also be a set. In this case the intersection will be the initially selected elements. The object to get the value from and to be based on to create the element name. The set of available elements The generated form element Creates a select element and its options based on the dataSource. If the dataSource elements are complex objects (ie not string or primitives), supply the parameters value and text to the dictionary to make the helper use the specified properties to extract the option value and content respectively. You can also specify the attribute firstoption to force the first option be something like 'please select'. You can set the value of firstoption by specifying the attribute firstoptionvalue. The default value is '0'. Usually the target is a single value and the dataSource is obviously a set with multiple items. The element types tend to be the same. If they are not, you might have to specify the suffix parameters on the attributes as it would not be inferred. The target can also be a set. In this case the intersection will be the initially selected elements. The object to get the value from and to be based on to create the element name. The set of available elements Attributes for the FormHelper method and for the html element it generates The generated form element Creates a select element and its options based on the dataSource. If the dataSource elements are complex objects (ie not string or primitives), supply the parameters value and text to the dictionary to make the helper use the specified properties to extract the option value and content respectively. You can also specify the attribute firstoption to force the first option be something like 'please select'. You can set the value of firstoption by specifying the attribute firstoptionvalue. The default value is '0'. Usually the target is a single value and the dataSource is obviously a set with multiple items. The element types tend to be the same. If they are not, you might have to specify the suffix parameters on the attributes as it would not be inferred. The target can also be a set. In this case the intersection will be the initially selected elements. The object to get the value from and to be based on to create the element name. The set of available elements Attributes for the FormHelper method and for the html element it generates The generated form element Generates the select. The target. The selected value. The data source. The attributes. Creates a list of pairs for the enum type. enum type. Configures this FormHelper instance to use the supplied web validator to generate field validation. The validation provider. Configures this FormHelper instance to use Prototype for form fields validation Configures this FormHelper instance to use fValidate for form fields validation Configures this FormHelper instance to use Zebda for form fields validation Disables the validation. Applies the validation. Type of the input. The target. The attributes. Rewrites the target if within object scope. The target. Creates the specified input element using the specified parameters to supply the name, value, id and others html attributes. The object to get the value from and to be based on to create the element name. Attributes for the FormHelper method and for the html element it generates The generated form element Creates the specified input element using the specified parameters to supply the name, value, id and others html attributes. The object to get the value from and to be based on to create the element name. Attributes for the FormHelper method and for the html element it generates The generated form element Creates the input element. The type. The value. The attributes. Formats if necessary. The value. The attributes. Obtains the target property. The context. The target. The action. Queries the context for the target value The object to get the value from and to be based on to create the element name. The generated form element Queries the context for the target value The object to get the value from and to be based on to create the element name. The generated form element Obtains the root instance. The context. The object to get the value from and to be based on to create the element name. The generated form element Obtains the root instance. The context. The target. The pieces. Obtains the type of the root. The context. The target. The pieces. The generated form element Creates the HTML id. The attributes. The target. The generated form element Creates the HTML id. The attributes. The target. if set to true [remove entry]. The generated form element Determines whether the present value matches the value on the initialSetValue (which can be a single value or a set) Value from the datasource Value from the initial selection set Optional. Property to obtain the value from true if the initial selection is a set true if it's selected This class is an enumerable list of checkboxes. It uses the to manage the sets and to control the check/uncheck state. Initializes a new instance of the class. The helper. The object to get the value from and to be based on to create the element name. The initial selection set. The set of available elements Attributes for the FormHelper method and for the html element it generates Outputs the Checkbox in the correct state (checked/unchecked) based on the Set. The generated input element Outputs the Checkbox in the correct state (checked/unchecked) based on the Set. The element id The generated input element Returns an enumerator that iterates through a collection. An object that can be used to iterate through the collection. Advances the enumerator to the next element of the collection. true if the enumerator was successfully advanced to the next element; false if the enumerator has passed the end of the collection. The collection was modified after the enumerator was created. Sets the enumerator to its initial position, which is before the first element in the collection. The collection was modified after the enumerator was created. Gets the current element in the collection. The current element in the collection. The enumerator is positioned before the first element of the collection or after the last element. Gets the current set item. The current set item. Abstracts the approach to access values on objects. Gets the value. The instance. Gets the name. The name. Implementation of that uses reflection to access values Initializes a new instance of the class. The prop info. Gets the value. The instance. Gets the name. The name. Implementation of to access DataRow's value Initializes a new instance of the class. Name of the column. Gets the value. The instance. Gets the name. The name. Implementation of to access DataRowView's value Initializes a new instance of the class. Name of the column. Gets the value. The instance. Gets the name. The name. Empty implementation of a Gets the value. The instance. Gets the name. The name. Implementation of to access enum fields Initializes a new instance of the class. Type of the enum. Gets the value. The instance. Gets the name. The name. Abstract factory for implementations Creates the specified target type. Type of the target. Name of the key. Initializes a new instance of the class. The target. if set to true [is validation enabled]. Gets the root target. The root target. Gets a value indicating whether this instance is validation enabled. true if this instance is validation enabled; otherwise, false. Provides usefull common methods to generate HTML tags. This helper provides the means to generate commonly used HTML tags. All of it's methods return that holds resulting HTML. Creates a fieldset tag with a legend. <fieldset><legend>legendArg</legend> Legend to use within the fieldset. HTML string opening a fieldset tag, followed by a legend tag. Calling FieldSet( "legendArg" ) results in: <fieldset><legend>legendArg</legend> This example shows how to use together with : $HtmlHelper.FieldSet( "legendArg" ) ... $HtmlHelper.EndFieldSet() Creates a closing fieldset tag. </fieldset> HTML string closing the fieldset. This method should be invoked after to close the fieldset. Calling EndFieldSet() results in: </fieldset> This example shows how to use together with : $HtmlHelper.FieldSet( "legendArg" ) ... $HtmlHelper.EndFieldSet() This method has three overloads. Creates a form tag with "post" method and specified . <form method="post" action="actionArg"> Target action for the form. HTML string with form opening tag. Calling Form( "actionArg" ) results in: <form method="post" action="actionArg"> This example shows how to use together with : $HtmlHelper.Form( "actionArg" ) ... $HtmlHelper.EndForm() Creates a form tag with the specified , and attributes. <form method="methodArg" action="actionArg" id="idArg"> Target action for the form. Form HTML ID. Form method (get, post, etc). HTML string with form opening tag. Calling Form( "actionArg", "idArg", "methodArg" ) results in: <form method="methodArg" action="actionArg" id="idArg"> This example shows how to use Form together with : $HtmlHelper.Form( "actionArg", "idArg", "methodArg" ) ... $HtmlHelper.EndForm() Creates a form tag with the specified and attributes, and event handler. <form method="methodArg" action="actionArg" id="idArg" onsubmit="onSubmitArg"> Target action for the form. Form HTML ID. Form method (get, post, etc). JavaScript inline code to be invoked upon form submission. HTML string with form opening tag. Calling Form( "actionArg", "idArg", "methodArg", "onSubmitArg" ) results in: <form method="methodArg" action="actionArg" id="idArg" onsubmit="onSubmitArg"> This example shows how to use Form together with : $HtmlHelper.Form( "actionArg", "idArg", "methodArg", "submitHandler()" ) ... $HtmlHelper.EndForm() Creates a form tag with the specified attribute. <form action="actionArg"> Target action for the form. Html Attributes for the form tag HTML string with form opening tag. Creates a form tag targeting a URL in the style of the methods. An action on the current controller. HTML string with form opening tag. Creates a form tag targeting a URL in the style of the methods. A controller name. An action on . HTML string with form opening tag. Creates a form tag targeting a URL in the style of the methods. A controller name. An action on . Object to use for the action ID argument. HTML string with form opening tag. Creates a form tag targeting a URL in the style of the methods. A controller name. An action on . Additional attributes for the form tag. HTML string with form opening tag. Creates a form tag targeting a URL in the style of the methods. A controller name. An action on . Object to use for the action ID argument. Additional attributes for the form tag. HTML string with form opening tag. Creates a form tag targeting a URL in the style of the methods. A controller name. An action on . Object to use for the action ID argument. Form method (get, post, etc). Additional attributes for the form tag. HTML string with form opening tag. Creates a closing form tag. </form> HTML string with form closing tag. Calling EndForm() results in: </form> This example shows how to use together with : $HtmlHelper.Form( "actionArg", "idArg", "methodArg", "submitHandler()" ) ... $HtmlHelper.EndForm() This method has two overloads. Creates an anchor (link) to the <a href="/sometarget.html">linkText</a> link's target. Text of the link. HTML string with anchor to the specified . Calling Link( "something.html", "to something" ) results in: <a href="something.html">something</a> This example shows how to use Link: $HtmlHelper.Link( "mypage.html", "This is a link to my page" ) Creates an anchor (link) to the <a href="/sometarget.html">linkText</a> link's target. Text of the link. Additional attributes for the a tag. HTML string with anchor to the specified . Calling Link( "something.html", "to something", $DictHelper.CreateDict("class=mylinkclass") ) results in: <a href="something.html" class="mylinkclass">something</a> This example shows how to use Link: $HtmlHelper.Link( "mypage.html", "This is a link to my page", $DictHelper.CreateDict("class=mylinkclass") ) This method has three overloads. Creates an anchor (link) to the on the current controller. <a href="/website/currentController/actionArg.rails">nameArg</a> Name for the link. Action to link to. HTML string with anchor to the specified . Calling LinkTo( "nameArg", "actionArg" ) results in: <a href="/websiter/currentController/actionArg.rails">nameArg</a> This example shows how to use LinkTo: $HtmlHelper.LinkTo( "linkName", "requiredAction" ) This method has three overloads. Creates an anchor (link) to the on the current controller. <a href="/website/currentController/actionArg.rails">nameArg</a> Name for the link. link options HTML string with anchor to the specified . Calling LinkTo( "nameArg", DictHelper.CreateDict("controller=home","action=index") ) results in: <a href="/websiter/home/index.rails">nameArg</a> This example shows how to use LinkTo: $HtmlHelper.LinkTo( "linkName", DictHelper.CreateDict("controller=home","action=index") ) Creates an anchor (link) to the on the specified . <a href="/website/controllerArg/actionArg.rails">nameArg</a> Name for the link. Controller to link to. Action to link to. HTML string with anchor to the specified and . Calling LinkTo( "nameArg", options ) results in: <a href="/website/controllerArg/actionArg.rails">nameArg</a> This example shows how to use LinkTo: $HtmlHelper.LinkTo( "linkName", {@action:} ) Creates an anchor (link) to the on the specified passing provided . <a href="/website/controllerArg/actionArg.rails?id=objectId">nameArg</a> Name for the link. Controller to link to. Action to link to. Object to use for the action ID argument. HTML string with anchor to the specified , and . Calling LinkTo( "nameArg", "controllerArg", "actionArg", object ) results in: <a href="/website/controllerArg/actionArg.rails?id=object">nameArg</a> is used to convert to the actual . This example shows how to use LinkTo: $HtmlHelper.LinkTo( "linkName", "someController", "requiredAction", objectToRefByID ) Creates an anchor (link) to the on the specified <a href="/website/controllerArg/actionArg.rails">nameArg</a> Name for the link. Controller to link to. Action to link to. Additional attributes for the a tag. HTML string with anchor to the specified Calling LinkToAttributed( "nameArg", "controllerArg", "actionArg", IDictionary ) results in: <a href="/website/controllerArg/actionArg.rails">nameArg</a> This example shows how to use LinkToAttributed: $HtmlHelper.LinkToAttributed( "linkName", "someController", "requiredAction", $DictHelper.CreateDict("class=something") ) Creates an anchor (link) to the on the specified <a href="/website/controllerArg/actionArg.rails?id=x">nameArg</a> Name for the link. Controller to link to. Action to link to. The ID to be passed as a parameter for the action Additional attributes for the a tag. HTML string with anchor to the specified Calling LinkToAttributed( "nameArg", "controllerArg", "actionArg", IDictionary ) results in: <a href="/website/controllerArg/actionArg.rails">nameArg</a> This example shows how to use LinkToAttributed: $HtmlHelper.LinkToAttributed( "linkName", "someController", "requiredAction", $DictHelper.CreateDict("class=something") ) Creates an anchor (link) to the on the current controller that posts using a hidden form element. Name for the link. Action to link to on the current controller. HTML string with anchor that posts to the current controller Creates an anchor (link) to the on the current controller that posts using a hidden form element. Name for the link. Action to link to on the current controller. The ID to be passed as a parameter for the action. HTML string with anchor that posts to the current controller Creates an anchor (link) to the on the current controller that posts using a hidden form element. Name for the link. Action to link to on the current controller. Guards the form submission with a javascript confirm popup. HTML string with anchor that posts to the current controller Creates an anchor (link) to the on the current controller that posts using a hidden form element. Name for the link. Action to link to on the current controller. The ID to be passed as a parameter for the action. Guards the form submission with a javascript confirm popup. HTML string with anchor that posts to the current controller Creates an anchor (link) to the on the specified that posts using a hidden form element. Name for the link. Controller to link to. Action to link to. The ID to be passed as a parameter for the action. HTML string with anchor that posts to the specified Creates an anchor (link) to the on the specified that posts using a hidden form element. Name for the link. Controller to link to. Action to link to. Guards the form submission with a javascript confirm popup. HTML string with anchor that posts to the specified Creates an anchor (link) to the on the specified that posts using a hidden form element. Name for the link. Controller to link to. Action to link to. The ID to be passed as a parameter for the action. Guards the form submission with a javascript confirm popup. HTML string with anchor that posts to the specified Creates an anchor (link) to the on the specified that posts using a hidden form element. Name for the link. Controller to link to. Action to link to. Guards the form submission with a javascript confirm popup. Additional attributes for the a tag. HTML string with anchor that posts to the specified Creates an anchor (link) to the on the specified that posts using a hidden form element. Name for the link. Controller to link to. Action to link to. The ID to be passed as a parameter for the action. Guards the form submission with a javascript confirm popup. Additional attributes for the a tag. HTML string with anchor that posts to the specified Maps to website virtual path. /website/targetArg Target path to map. URL string pointing to the in the context of the website. Calling MapToVirtual( "targetArg" ) results in: /website/targetArg This example shows how to use : $HtmlHelper.MapToVirtual( "targetFolder/targetFile.html" ) This method has two overloads. Creates a label for the element indicated with . <label for="forIdArg">labelArg</label> ID of the element for which to create the lable. Label name. HTML string with generated label. Calling LabelFor( "forIdArg", "labelArg" ) results in: <label for="forIdArg">labelArg</label> This example shows how to use : $HtmlHelper.LabelFor( "forIdArg", "labelArg" ) Creates a label for the element indicated with . <label key1="value1" key2="value2" for="forIdArg">labelArg</label> ID of the element for which to create the label. Label name. Additional attributes to add to the label. HTML string with generated label. Calling LabelFor( "forIdArg", "labelArg", IDictionary ) results in: <label key5="value5" key4="value4" key1="value1" key3="value3" key2="value2" for="forIdArg">labelArg</label> is used to generate additional attributes for the label tag. are used to name attributes. are used to assign those attributes values. This example shows how to use : $HtmlHelper.LabelFor( "forIdArg", "labelArg", IDictionary ) This method has two overloads. Creates three select tags to input day, month and year. <select name="nameArgday" id="nameArgday" > ... </select> <select name="nameArgmonth" id="nameArgmonth" > ... </select> <select name="nameArgyear" id="nameArgyear" > ... </select> Name to use with name and id arguments of the select tag. to use for default selected date. A long HTML string with three select tag input date. Calling DateTime( "nameArg", new DateTime( 2005, 07, 15 ) ) results in: <select name="nameArgday" id="nameArgday" > <option>1</option> <option>2</option> ... <option>14</option> <option selected>15</option> <option>16</option> ... <option>30</option> <option>31</option> </select> <select name="nameArgmonth" id="nameArgmonth" > <option>1</option> <option>2</option> ... <option>6</option> <option selected>7</option> <option>8</option> ... <option>11</option> <option>12</option> </select> <select name="nameArgyear" id="nameArgyear" > <option>1930</option> <option>1931</option> ... <option>2004</option> <option selected>2005</option> <option>2006</option> ... <option>2029</option> </select> As above example shows the year range is hardcoded between 1930 and 2029. is used to generate name and id for each select tag. Supplied is concatenated with "day", "month", or "year" to create for the tag attributes. This example shows how to use DateTime: $HtmlHelper.DateTime( "nameArg", new DateTime( 2005, 07, 15 ) ) Creates three select tags to input day, month and year. <select name="nameArgday" id="nameArgday" key1="value1" key3="value3" key2="value2" > ... </select> <select name="nameArgmonth" id="nameArgmonth" key1="value1" key3="value3" key2="value2" > ... </select> <select name="nameArgyear" id="nameArgyear" key1="value1" key3="value3" key2="value2" > ... </select> Name to use with name and id arguments of the select tag. to use for default selected date. Additional attributes for select tags. A long HTML string with three select tag input date. Calling DateTime( "nameArg", new DateTime( 2005, 07, 15 ), IDictionary ) results in: <select name="nameArgday" id="nameArgday" key1="value1" key2="value2" > <option>1</option> <option>2</option> ... <option>14</option> <option selected>15</option> <option>16</option> ... <option>30</option> <option>31</option> </select> <select name="nameArgmonth" id="nameArgmonth" key1="value1" key2="value2" > <option>1</option> <option>2</option> ... <option>6</option> <option selected>7</option> <option>8</option> ... <option>11</option> <option>12</option> </select> <select name="nameArgyear" id="nameArgyear" key1="value1" key2="value2" > <option>1930</option> <option>1931</option> ... <option>2004</option> <option selected>2005</option> <option>2006</option> ... <option>2029</option> </select> As above example shows the year range is hardcoded between 1930 and 2029. is used to generate name and id for each select tag. Supplied is concatenated with "day", "month", or "year" to create for the tag attributes. is used to generate additional attributes for each of the select tags. are used to name attributes. are used to assign those attributes values. This example shows how to use DateTime: $HtmlHelper.DateTime( "nameArg", new DateTime( 2005, 07, 15 ), IDictionary ) Creates a text area element. <textarea id="nameArg" name="nameArg" cols="10" rows="10">valueArg</textarea> Value for name and id attributes. cols attribute value. rows attribute value. Text to place inside of the text area. HTML string with closed textarea tag. Calling TextArea( "nameArg", 10, 10, "valueArg" ) results in: <textarea id="nameArg" name="nameArg" cols="10" rows="10">valueArg</textarea> This example shows how to use : $HtmlHelper.TextArea( "nameArg", 10, 20, "Text inside text area." ) This method has three overloads. Creates an input element of the button type. <input type="button" value="valueArg" /> for value attribute. HTML string with button type input tag. Calling InputButton( "valueArg" ) results in: <input type="button" name="valueArg" value="valueArg" /> This example shows how to use InputButton: $HtmlHelper.InputButton( "valueArg" ) Creates an input element of the button type. <input type="button" name="nameArg" id="nameArg" value="valueArg" /> Value for name and id attributes. for value attribute. HTML string with button type input tag. Creates an input element of the button type. <input type="button" name="nameArg" id="nameArg" value="valueArg" /> Value for name and id attributes. for value attribute. Additional attributes for the input tag. HTML string with button type input tag. This method has three overloads. Creates an input element of the checkbox type. <input type="checkbox" name="nameArg" id="nameArg" value="valueArg" /> Value for name and id attributes. for value attribute. HTML string with checkbox type input tag. Calling InputCheckbox( "name", "1" ) results in: <input type="checkbox" name="name" id="name" value="1" /> Creates an input element of the checkbox type. <input type="checkbox" name="nameArg" id="nameArg" value="valueArg" /> Value for name and id attributes. for value attribute. If true, adds the checked attributed to the tag HTML string with checkbox type input tag. Creates an input element of the checkbox type. <input type="checkbox" name="nameArg" id="nameArg" value="valueArg" /> Value for name and id attributes. for value attribute. Additional attributes for the input tag. HTML string with checkbox type input tag. This method has two overloads. Creates an input element of the radio type. <input type="radio" name="nameArg" value="valueArg" /> Value for name attribute. for value attribute. HTML string with radio type input tag. Calling InputRadio( "name", "1" ) results in: <input type="radio" name="name" value="1" /> Creates an input element of the radio type. <input type="radio" name="nameArg" value="valueArg" /> Value for name attribute. for value attribute. Additional attributes for the input tag. HTML string with radio type input tag. This method has two overloads. Creates an input element of the file type. <input type="file" name="nameArg" /> Value for name attribute. HTML string with file type input tag. Calling InputFile( "name" ) results in: <input type="file" name="name" /> Creates an input element of the file type. <input type="file" name="nameArg" /> Value for name attribute. Additional attributes for the input tag. HTML string with file type input tag. This method has four overloads. Creates an input element of the text type. <input type="text" name="nameArg" id="nameArg" value="valueArg" /> Value for name and id attributes. for value attribute. HTML string with text type input tag. Calling InputText( "nameArg", "valueArg" ) results in: <input type="text" name="nameArg" id="nameArg" value="valueArg" /> This example shows how to use InputText: $HtmlHelper.InputText( "nameArg", "valueArg" ) Creates an input element of the text type of specified and . <input type="text" name="nameArg" id="nameArg" value="valueArg" size="10" maxlength="10" /> Value for name and id attributes. for value attribute. size attribute value. maxlength attribute value. HTML string with text type input tag. Calling InputText( "nameArg", "valueArg", 10, 10 ) results in: <input type="text" name="nameArg" id="nameArg" value="valueArg" size="10" maxlength="10" /> This example shows how to use InputText: $HtmlHelper.InputText( "nameArg", "valueArg", 10, 10 ) Creates an input element of the text type with specified , and . <input type="text" name="nameArg" id="nameArg" value="valueArg" size="10" maxlength="10" /> Value for name and id attributes. for value attribute. size attribute value. maxlength attribute value. Additional attributes for the input tag. HTML string with text type input tag. Calling InputText( "nameArg", "valueArg", 10, 10, IDictionary ) results in: <input type="text" name="nameArg" id="nameArg" value="valueArg" size="10" maxlength="10" key1="value1" key2="value2" /> is used to generate additional attributes for the label tag. are used to name attributes. are used to assign those attributes values. This example shows how to use InputText: $HtmlHelper.InputText( "nameArg", "valueArg", 10, 10, IDictionary ) Creates an input element of the text type with custom and . <input type="text" name="nameArg" id="idArg" value="valueArg" /> name attribute value. for value attribute. id attribute value. HTML string with text type input tag. Calling InputText( "nameArg", "valueArg", "idArg" ) results in: <input type="text" name="nameArg" id="idArg" value="valueArg" /> This example shows how to use InputText: $HtmlHelper.InputText( "nameArg", "valueArg", "idArg" ) This method has two overloads. Creates a hidden type input element. <input type="hidden" name="nameArg" id="nameArg" value="valueArg" /> Creates an input element of password type Creates an input element of password type Creates an input element of password type Creates an input hidden element Value for name and id attributes. for value attribute. HTML string with hidden type input tag. Calling InputHidden( "nameArg", "valueArg" ) results in: <input type="hidden" name="nameArg" id="nameArg" value="valueArg" /> This example shows how to use InputHidden: $HtmlHelper.InputHidden( "nameArg", "valueArg" ) Creates a hidden type input element. <input type="hidden" name="nameArg" id="nameArg" value="object" /> Value for name and id attributes. to supply for value attribute. HTML string with hidden type input tag. Calling InputHidden( "nameArg", object ) results in: <input type="hidden" name="nameArg" id="nameArg" value="object" /> for value attribute is retrieved from via . If is null is used as the value . This example shows how to use InputHidden: $HtmlHelper.InputHidden( "nameArg", object ) This method has two overloads. Creates a submit button. <input type="submit" value="valueArg" /> for value attribute. HTML string with submit type input tag. Calling SubmitButton( "valueArg" ) results in: <input type="submit" value="valueArg" /> This example shows how to use SubmitButton: $HtmlHelper.SubmitButton( "valueArg" ) Creates a submit button. <input type="submit" value="valueArg" key1="value1" key2="value2" /> for value attribute. Additional attributes for the input tag. Calling SubmitButton( "valueArg", IDictionary ) results in: <input type="submit" value="valueArg" key1="value1" key2="value2" /> is used to generate additional attributes for the label tag. are used to name attributes. are used to assign those attributes values. This example shows how to use SubmitButton: $HtmlHelper.SubmitButton( "valueArg", IDictionary ) This method has two overloads. Creates opening select tag. <select name="nameArg" id="nameArg"> Value for name and id attributes. HTML string with opening select tag. Calling Select( "nameArg" ) results in: <select name="nameArg" id="nameArg"> This example shows how to use Select together with : $HtmlHelper.Select( "nameArg" ) ... $HtmlHelper.EndSelect() Creates opening select tag. <select name="nameArg" id="nameArg" key1="value1" key2="value2" > Value for name and id attributes. Additional attributes for the select tag. Calling Select( "nameArg", IDictionary ) results in: <select name="nameArg" id="nameArg" key1="value1" key2="value2" > is used to generate additional attributes for the label tag. are used to name attributes. are used to assign those attributes values. This example shows how to use Select together with : $HtmlHelper.Select( "nameArg", IDictionary ) ... $HtmlHelper.EndSelect() Creates a closing select tag. Calling EndSelect() results in: </select> This example shows how to use together with EndSelect: $HtmlHelper.Select( "nameArg" ) ... $HtmlHelper.EndSelect() Creates an opening optgroup element. The label attribute. An opening optgroup element. Creates a closing optgroup element. A closing optgroup element. TODO: Document this! TODO: Document this! Valid html attributes include: selected and disabled Creates option elements from . Marks the option that matches the argument (if provided). <option>0</option> <option>1</option> ... <option>5</option> <option selected>selectedArg</option> <option>object</option> Array of values for each option tag. Name of the option tag to mark selected. HTML string with array of option tags. Calling CreateOptionsFromPrimitiveArray( Array, "selectedArg" ) results in: <option>0</option> <option>1</option> <option>2</option> <option>3</option> <option>4</option> <option>5</option> <option selected>selectedArg</option> <option>object</option> Elements in the array are converted to using . This example shows how to use CreateOptionsFromPrimitiveArray: $HtmlHelper.CreateOptionsFromPrimitiveArray( Array, "selectedArg" ) This method has two overloads. Creates options elements from an . <option value="valueProp">textProp</option> <option value="0">textProp2</option> <option value="5">textProp3</option> Collection of objects each of which describes an option tag. Name of the objects property with the value for each option tag's text. Name of the objects property with the value for each option tag's value attribute value. HTML string with array of option tags. Calling CreateOptionsFromArray( Array, "textPropertyArg", "valuePropertyArg", object ) with specific type objects results in: <option value="valueProp">textProp</option> <option value="0">textProp2</option> <option value="5">textProp3</option> Calling CreateOptionsFromArray( Array, "textPropertyArg", "valuePropertyArg", object ) with random type objects results in: <option>0</option> <option>1</option> <option>2</option> <option>3</option> <option>4</option> <option>5</option> <option>object</option> <option>MR.Logic.Controllers.HtmlHelperController+SampleClass</option> Notice that the last option was generated from an object of the type with the properties specified by and , but the method is already in the mode of working with random type objects. Explanation bellow describes two different modes of working with the method. There are two possible usages of the method depending on the types of s which can be present in : Random type objects Array is full of random type objects. Properties specified by and aren't used. Instead value argument is ommited and is invoked on each item in to retrieve text for an option tag. Single type objects Array is objects of one time. In this case and can specify the names of the properties of that type to use for option tags generation. You cannot mix random type objects and specific type objects. CreateOptionsFromArray is looking at the first item in the collection to get to access specified properties. If usage is mixed either an unexpected exception will be thrown or options will have unexpected strings. CreateOptionsFromArray relies on to generate all option tags. This example shows how to use CreateOptions: $HtmlHelper.CreateOptionsFromArray( ICollection, "textPropertyArg", "valuePropertyArg" ) Creates options elements from an . <option value="valueProp" selected>textProp</option> <option value="0">textProp2</option> <option value="5">textProp3</option> Collection of objects each of which describes an option tag. Name of the objects property with the value for each option tag's text. Name of the objects property with the value for each option tag's value attribute value. indicating which option tag is to be marked with selected attribute. HTML string with array of option tags. Calling CreateOptionsFromArray( Array, "textPropertyArg", "valuePropertyArg", object ) with specific type objects results in: <option value="valueProp" selected>textProp</option> <option value="0">textProp2</option> <option value="5">textProp3</option> Calling CreateOptionsFromArray( Array, "textPropertyArg", "valuePropertyArg", object ) with random type objects results in: <option>0</option> <option>1</option> <option>2</option> <option>3</option> <option>4</option> <option>5</option> <option selected>object</option> <option>MR.Logic.Controllers.HtmlHelperController+SampleClass</option> Notice that the last option was generated from an object of the type with the properties specified by and , but the method is already in the mode of working with random type objects. Explanation bellow describes two different modes of working with the method. There are two possible usages of the method depending on the types of s which can be present in : Random type objects Array is full of random type objects. Properties specified by and aren't used. Instead value argument is ommited and is invoked on each item in to retrieve text for an option tag. Single type objects Array is objects of one time. In this case and can specify the names of the properties of that type to use for option tags generation. You cannot mix random type objects and specific type objects. CreateOptionsFromArray is looking at the first item in the collection to get to access specified properties. If usage is mixed either an unexpected exception will be thrown or options will have unexpected strings. CreateOptionsFromArray relies on to generate all option tags. This example shows how to use CreateOptions: $HtmlHelper.CreateOptionsFromArray( ICollection, "textPropertyArg", "valuePropertyArg", object ) This method has two overloads. Creates options elements from an . <option value="valueProp">textProp</option> <option value="0">textProp2</option> <option value="5">textProp3</option> Collection of objects each of which describes an option tag. Name of the objects property with the value for each option tag's text. Name of the objects property with the value for each option tag's value attribute value. HTML string with array of option tags. Calling CreateOptions( ICollection, "textPropertyArg", "valuePropertyArg", object ) with specific type objects results in: <option value="valueProp">textProp</option> <option value="0">textProp2</option> <option value="5">textProp3</option> Calling CreateOptions( ICollection, "textPropertyArg", "valuePropertyArg", object ) with random type objects results in: <option>0</option> <option>1</option> <option>2</option> <option>3</option> <option>4</option> <option>5</option> <option>object</option> <option>MR.Logic.Controllers.HtmlHelperController+SampleClass</option> Notice that the last option was generated from an object of the type with the properties specified by and , but the method is already in the mode of working with random type objects. Explanation bellow describes two different modes of working with the method. There are two possible usages of the method depending on the types of s which can be present in : Random type objects Array is full of random type objects. Properties specified by and aren't used. Instead value argument is ommited and is invoked on each item in to retrieve text for an option tag. Single type objects Array is objects of one time. In this case and can specify the names of the properties of that type to use for option tags generation. You cannot mix random type objects and specific type objects. CreateOptions is looking at the first item in the collection to get to access specified properties. If usage is mixed either an unexpected exception will be thrown or options will have unexpected strings. This example shows how to use CreateOptions: $HtmlHelper.CreateOptions( ICollection, "textPropertyArg", "valuePropertyArg" ) Creates options elements from an . <option value="valueProp" selected>textProp</option> <option value="0">textProp2</option> <option value="5">textProp3</option> Collection of objects each of which describes an option tag. Name of the objects property with the value for each option tag's text. Name of the objects property with the value for each option tag's value attribute value. indicating which option tag is to be marked with selected attribute. HTML string with array of option tags. Calling CreateOptions( ICollection, "textPropertyArg", "valuePropertyArg", object ) with specific type objects results in: <option value="valueProp" selected>textProp</option> <option value="0">textProp2</option> <option value="5">textProp3</option> Calling CreateOptions( ICollection, "textPropertyArg", "valuePropertyArg", object ) with random type objects results in: <option>0</option> <option>1</option> <option>2</option> <option>3</option> <option>4</option> <option>5</option> <option selected>object</option> <option>MR.Logic.Controllers.HtmlHelperController+SampleClass</option> Notice that the last option was generated from an object of the type with the properties specified by and , but the method is already in the mode of working with random type objects. Explanation bellow describes two different modes of working with the method. There are two possible usages of the method depending on the types of s which can be present in : Random type objects Array is full of random type objects. Properties specified by and aren't used. Instead value argument is ommited and is invoked on each item in to retrieve text for an option tag. Single type objects Array is objects of one time. In this case and can specify the names of the properties of that type to use for option tags generation. You cannot mix random type objects and specific type objects. CreateOptions is looking at the first item in the collection to get to access specified properties. If usage is mixed either an unexpected exception will be thrown or options will have unexpected strings. This example shows how to use CreateOptions: $HtmlHelper.CreateOptions( ICollection, "textPropertyArg", "valuePropertyArg", object ) Determines whether the specified value is selected. Value to be tested. Selected value. if is ; otherwise, . if the specified is selected; otherwise, . Specified is selected if it to the . Or if is an array is selected if can find it in . Gets the property get method. Object specifying the type for which to get the method. Property name. to be used to retrieve the property value. If is null null is returned. This method is used to get the to retrieve specified property from the specified type. Thrown is is null. This method has two overloads. Builds an unordered ul list from supplied . <ul> <li>0</li> ... <li>object</li> </ul> Collection with items to use for the list generation. HTML string with ul tag list. Calling BuildUnorderedList( ICollection ) results in: <ul> <li>0</li> <li>1</li> <li>2</li> <li>3</li> <li>4</li> <li>5</li> <li>object</li> </ul> Items in are converted to string through . This example shows how to use BuildUnorderedList: $HtmlHelper.BuildUnorderedList( ICollection ) Builds an unordered ul list from supplied with ul and li tags CSS class set to supplied attributes. <ol class="styleClassArg"> <li class="itemClassArg">0</li> ... <li class="itemClassArg">object</li> </ol> Collection with items to use for the list generation. CSS class name of the list ul tag. CSS class name of the list item li tag. HTML string with ul tag list. Calling BuildUnorderedList( ICollection, "styleClassArg", "itemClassArg" ) results in: <ol class="styleClassArg"> <li class="itemClassArg">0</li> <li class="itemClassArg">1</li> <li class="itemClassArg">2</li> <li class="itemClassArg">3</li> <li class="itemClassArg">4</li> <li class="itemClassArg">5</li> <li class="itemClassArg">object</li> </ol> Items in are converted to string through . This example shows how to use BuildOrderedList: $HtmlHelper.BuildUnorderedList( ICollection, "styleClassArg", "itemClassArg" ) This method has two overloads. Builds an ordered ol list from supplied . <ol> <li>0</li> ... <li>object</li> </ol> Collection with items to use for the list generation. HTML string with ol tag list. Calling BuildOrderedList( ICollection ) results in: <ol> <li>0</li> <li>1</li> <li>2</li> <li>3</li> <li>4</li> <li>5</li> <li>object</li> </ol> Items in are converted to string through . This example shows how to use BuildOrderedList: $HtmlHelper.BuildOrderedList( ICollection ) Builds an ordered ol list from supplied with ol and li tags CSS class set to supplied attributes. <ol class="styleClassArg"> <li class="itemClassArg">0</li> ... <li class="itemClassArg">object</li> </ol> Collection with items to use for the list generation. CSS class name of the list ol tag. CSS class name of the list item li tag. HTML string with ol tag list. Calling BuildOrderedList( ICollection, "styleClassArg", "itemClassArg" ) results in: <ol class="styleClassArg"> <li class="itemClassArg">0</li> <li class="itemClassArg">1</li> <li class="itemClassArg">2</li> <li class="itemClassArg">3</li> <li class="itemClassArg">4</li> <li class="itemClassArg">5</li> <li class="itemClassArg">object</li> </ol> Items in are converted to string through . This example shows how to use BuildOrderedList: $HtmlHelper.BuildOrderedList( ICollection, "styleClassArg", "itemClassArg" ) Builds a list with list tag specified by from supplied with list tag and li tags CSS class set to supplied attributes. <listTag class="styleClassArg"> <li class="itemClassArg">0</li> ... <li class="itemClassArg">object</li> </listTag> List tag name. Collection with items to use for the list generation. CSS class name of the list ol tag. CSS class name of the list item li tag. HTML string with list of the requested type. This method is can be used to generate custom type HTML list. Currently HTML support only two types of lists ordered (ol tag) and unodered (ultag). In general this method should be used by other methods responsible for constructing some specific list. Calling BuildList( "listTag", ICollection, "styleClassArg", "itemClassArg" ) results in: <listTag class="styleClassArg"> <li class="itemClassArg">0</li> <li class="itemClassArg">1</li> <li class="itemClassArg">2</li> <li class="itemClassArg">3</li> <li class="itemClassArg">4</li> <li class="itemClassArg">5</li> <li class="itemClassArg">object</li> </listTag> Items in are converted to string through . This example shows how to use BuildList: BuildList("ol", elements, styleClass, itemClass); Generates a list item li tag. <li class="itemClassArg">object</li> Item text. Item CSS class name. HTML string with a single li tag. This method should be used to assist list generation. Calling BuildListItem( "object", "itemClassArg" ) results in: <li class="itemClassArg">object</li> This example shows how to use BuildListItem: BuildListItem(item.ToString(), itemClass); Operations to act on a collection/array of DOM elements. Not really implemented Gets the parent generator. The parent generator. Depicts the operations supported by the element Js generator. In practice you can access this generator by using the element accessor. For example (using nvelocity syntax): $page.el('element id') -> IJSElementGenerator instance Replaces the content of the element. The following example uses nvelocity syntax: $page.el('elementid').ReplaceHtml("%{partial='shared/newmessage.vm'}") Defines what to render Replaces the entire element's content -- and not only its innerHTML -- by the content evaluated. The following example uses nvelocity syntax: $page.el('messagediv').Replace("%{partial='shared/newmessage.vm'}") Defines what to render Gets the parent generator. The parent generator. Depicts the contract for javascript generators. Urls can be specified as string or a dictionary. If the latter, the is used. See The renderOptions is also a common parameter. If you pass a string, the string will be rendered. If it is a dictionary, it instructs the infrastructure to render a partial content. The dictionary must contain an entry named partial with the absolute path to the view to render. The following is an example of using it with a nvelocity syntax and renders static content: $page.InsertHtml('Bottom', 'messagestable', "Message sent") The following uses a partial view: $page.InsertHtml('Bottom', 'messagestable', "%{partial='shared/newmessage.vm'}") The following redirects to a static page $page.RedirectTo('about.aspx') The following redirects using the $page.RedirectTo("%{controller='Home',action='index'}") Inserts a content snippet relative to the element specified by the The supported positions are Top, After, Before, Bottom The following example uses nvelocity syntax: $page.InsertHtml('Bottom', 'messagestable', "%{partial='shared/newmessage.vm'}") The position to insert the content relative to the element id The target element id Defines what to render Replaces the content of the specified target element. The following example uses nvelocity syntax: $page.ReplaceHtml('messagediv', "%{partial='shared/newmessage.vm'}") The target element id Defines what to render Replaces the entire target element -- and not only its innerHTML -- by the content evaluated. The following example uses nvelocity syntax: $page.Replace('messagediv', "%{partial='shared/newmessage.vm'}") The target element id Defines what to render Shows the specified elements. The elements must exist. The following example uses nvelocity syntax: $page.Show('div1', 'div2') The elements ids. Hides the specified elements. The elements must exist. The following example uses nvelocity syntax: $page.Hide('div1', 'div2') The elements ids. Toggles the display status of the specified elements. The elements must exist. The following example uses nvelocity syntax: $page.Toggle('div1', 'div2') The elements ids. Remove the specified elements from the DOM. The elements must exist. The following example uses nvelocity syntax: $page.Remove('div1', 'div2') The elements ids. Shows a JS alert The following example uses nvelocity syntax: $page.Alert('You won a Mercedez') The message to display. Redirects to an url using the location.href. This is required as most ajax libs don't care for the redirect status in the http reply. The following redirects to a static page $page.RedirectTo('about.aspx') The following redirects using the $page.RedirectTo("%{controller='Home',action='index'}") The URL. Re-apply Behaviour css' rules. Only makes sense if you are using the Behaviour javascript library. Generates a call to a scriptaculous' visual effect. The following example uses nvelocity syntax: $page.VisualEffect('ToggleSlide', 'myelement') This is especially useful to show which elements where updated in an ajax call. $page.ReplaceHtml('mydiv', "Hey, I've changed") $page.VisualEffect('Highlight', 'mydiv') The effect name. The target element. The optional options. Generates a call to a scriptaculous' drop out visual effect. The target element. The optional options. Assigns a javascript variable with the expression. The following example uses nvelocity syntax: $page.Assign('myvariable', '10') Which outputs: myvariable = 10; With strings you can escape strings: $page.Assign('myvariable', '\'Hello world\'') Which outputs: myvariable = 'Hello world'; The target variable The right side expression Declares the specified variable as null. The variable name. Calls the specified function with the optional arguments. The following example uses nvelocity syntax: $page.call('myJsFunctionAlreadyDeclared', '10', "'message'", $somethingfrompropertybag, $anothermessage.to_squote) Which outputs: myJsFunctionAlreadyDeclared(10, 'message', 1001, 'who let the dogs out?') The function name. The arguments. Outputs the content using the renderOptions approach. If the renderOptions is a string, the content is escaped and quoted. If the renderOptions is a dictionary, we extract the key partial and evaluate the template it points to. The content is escaped and quoted. The following example uses nvelocity syntax: $page.Call('myJsFunction', $page.render("%{partial='shared/newmessage.vm'}") ) Which outputs: myJsFunction('the content from the newmessage partial view template') The render options. Writes the content specified to the generator instance This is for advanced scenarios and for the infrastructure. Usually not useful. The content. Writes the content specified to the generator instance This is for advanced scenarios and for the infrastructure. Usually not useful. The content. Dump the operations recorded so far as javascript code. Creates a generator for a collection. The root expression. Creates a generator for an element. The root expression. Gets the js lines. The js lines. Represents a page of a bigger set Indexes are zero based. Checks whether the specified page exists. Useful for Google-like pagination. The index this page represents