Table of contents
- 1 Constructors
- 2 Properties
- 3 Methods
- 3.1 SupportsSection(String name) : Boolean
- 3.2 Render()
- 3.3 Initialize()
- 3.4 Init(IRailsEngineContext railsContext, IViewComponentContext context)
- 3.5 RenderView(String name)
- 3.6 RenderView(String component, String name)
- 3.7 RenderSharedView(String name)
- 3.8 CancelView()
- 3.9 RenderText(String content)
ViewComponent API Document
Base class for UI Components
Constructors
ViewComponent()
Initializes a new instance of the Castle.MonoRail.Framework.ViewComponent class.
Properties
| Name | Type | Description |
|---|---|---|
| Context | IViewComponentContext | Gets the Component Context |
| RailsContext | IRailsEngineContext | Gets the Castle.MonoRail.Framework.IRailsEngineContext associated with the current request |
| ComponentParams | IDictionary | Gets the component parameters |
| Session | IDictionary | Gets the Session dictionary. |
| Flash | Flash | Gets a dictionary of volative items. Ideal for showing success and failures messages. |
| HttpContext | HttpContext | Gets the web context of ASP.NET API. |
| Request | IRequest | Gets the request object. |
| Response | IResponse | Gets the response object. |
| PropertyBag | IDictionary | Provides a way to make data available to the view that the component uses |
| Params | NameValueCollection | Shortcut to Request.Params |
Methods
SupportsSection(String name) : Boolean
Implementor should return true only if the name is a known section the view component supports.
| Parameter | Description |
|---|---|
| name | section being added |
Render()
Called by the framework so the component can render its content
Initialize()
Called by the framework once the component instance is initialized
Init(IRailsEngineContext railsContext, IViewComponentContext context)
Invoked by the framework.
| Parameter | Description |
|---|---|
| railsContext | |
| context |
RenderView(String name)
Specifies the view to be processed after the component has finished its processing.
| Parameter | Description |
|---|---|
| name | Missing documentation |
RenderView(String component, String name)
Specifies the view to be processed after the component has finished its processing.
| Parameter | Description |
|---|---|
| component | Missing documentation |
| name | Missing documentation |
RenderSharedView(String name)
Specifies the shared view to be processed after the component has finished its processing. (A partial view shared by others views and usually in the root folder of the view directory).
| Parameter | Description |
|---|---|
| name | Missing documentation |
CancelView()
Cancels the view processing.
RenderText(String content)
Missing summary
| Parameter | Description |
|---|---|
| content | Missing documentation |