C# Class Castle.MonoRail.Framework.Views.NVelocity.CustomDirectives.AbstractComponentDirective

Pendent
Inheritance: NVelocity.Runtime.Directive.Directive, IViewRenderer
Show file Open project: nats/castle-1.0.3-mono

Public Methods

Method Description
AbstractComponentDirective ( IViewComponentFactory viewComponentFactory, IViewEngine viewEngine ) : NVelocity.Runtime.Parser.Node

Initializes a new instance of the AbstractComponentDirective class.

Init ( IRuntimeServices rs, NVelocity.Context.IInternalContextAdapter context, INode node ) : void
Render ( NVelocity.Context.IInternalContextAdapter context, TextWriter writer, INode node ) : bool
RenderComponentView ( NVelocity.Context.IInternalContextAdapter context, String viewToRender, TextWriter writer, NVelocityViewContextAdapter contextAdapter ) : bool

Protected Methods

Method Description
CreateParameters ( NVelocity.Context.IInternalContextAdapter context, INode node ) : IDictionary
ProcessSubSections ( ViewComponent component, NVelocityViewContextAdapter contextAdapter ) : void

Private Methods

Method Description
CheckTemplateStack ( NVelocity.Context.IInternalContextAdapter context ) : void
Evaluate ( NVelocity.Runtime.Parser.Node.SimpleNode inlineNode, NVelocity.Context.IInternalContextAdapter context ) : object
GetTemplate ( String viewToRender, String encoding ) : NVelocity.Template
ProcessFirstParam ( INode node, NVelocity.Context.IInternalContextAdapter context, int childrenCount ) : IDictionary

Processes the first param. first param can either be the literal string 'with' which means the user is using the syntax #blockcomponent(ComponentName with "param1=value1" "param2=value2") or it could be a dictionary string like: #blockcomponent(ComponentName "#{ param1='value1', param2='value2' }") anything different than that will throw an exception

ProcessRemainingParams ( int childrenCount, INode node, NVelocity.Context.IInternalContextAdapter context ) : IDictionary
RenderView ( NVelocity.Context.IInternalContextAdapter context, String viewToRender, NVelocity.Template template, TextWriter writer ) : bool
SetUpEncoding ( NVelocity.Context.IInternalContextAdapter context ) : String

Method Details

AbstractComponentDirective() public method

Initializes a new instance of the AbstractComponentDirective class.
public AbstractComponentDirective ( IViewComponentFactory viewComponentFactory, IViewEngine viewEngine ) : NVelocity.Runtime.Parser.Node
viewComponentFactory IViewComponentFactory The view component factory.
viewEngine IViewEngine The view engine instance
return NVelocity.Runtime.Parser.Node

CreateParameters() protected method

protected CreateParameters ( NVelocity.Context.IInternalContextAdapter context, INode node ) : IDictionary
context NVelocity.Context.IInternalContextAdapter
node INode
return IDictionary

Init() public method

public Init ( IRuntimeServices rs, NVelocity.Context.IInternalContextAdapter context, INode node ) : void
rs IRuntimeServices
context NVelocity.Context.IInternalContextAdapter
node INode
return void

ProcessSubSections() protected method

protected ProcessSubSections ( ViewComponent component, NVelocityViewContextAdapter contextAdapter ) : void
component Castle.MonoRail.Framework.ViewComponent
contextAdapter NVelocityViewContextAdapter
return void

Render() public method

public Render ( NVelocity.Context.IInternalContextAdapter context, TextWriter writer, INode node ) : bool
context NVelocity.Context.IInternalContextAdapter
writer System.IO.TextWriter
node INode
return bool

RenderComponentView() public method

public RenderComponentView ( NVelocity.Context.IInternalContextAdapter context, String viewToRender, TextWriter writer, NVelocityViewContextAdapter contextAdapter ) : bool
context NVelocity.Context.IInternalContextAdapter
viewToRender String
writer System.IO.TextWriter
contextAdapter NVelocityViewContextAdapter
return bool