C# 클래스 Castle.MonoRail.Framework.Views.NVelocity.NVelocityViewEngine

Implements a view engine using the popular Velocity syntax.

For details on the syntax, check the VTL Reference Guide http://jakarta.apache.org/velocity/docs/vtl-reference-guide.html

상속: ViewEngineBase, IInitializable
파일 보기 프로젝트 열기: nats/castle-1.0.3-mono

보호된 프로퍼티들

프로퍼티 타입 설명
velocity NVelocity.App.VelocityEngine

공개 메소드들

메소드 설명
CreateJSGenerator ( IRailsEngineContext context ) : object
GenerateJS ( TextWriter output, IRailsEngineContext context, Controller controller, string templateName ) : void
HasTemplate ( String templateName ) : bool

Evaluates whether the specified template exists.

Initialize ( ) : void
NVelocityViewEngine ( ) : NVelocity

Creates a new NVelocityViewEngine instance.

Process ( IRailsEngineContext context, Controller controller, String viewName ) : void

Processes the specified context.

Process ( TextWriter output, IRailsEngineContext context, Controller controller, String viewName ) : void

Processes the view - using the templateName to obtain the correct template and writes the results to the System.TextWriter. No layout is applied!

ProcessContents ( IRailsEngineContext context, Controller controller, String contents ) : void
ProcessPartial ( TextWriter output, IRailsEngineContext context, Controller controller, string partialName ) : void
Service ( IServiceProvider provider ) : void

보호된 메소드들

메소드 설명
BeforeApplyingLayout ( string layout, string &contents, Controller controller, IContext ctx, IRailsEngineContext context ) : void
BeforeMerge ( VelocityEngine velocityEngine, Template template, IContext context ) : void
InitializeVelocityProperties ( ExtendedProperties props ) : void

Initializes basic velocity properties. The main purpose of this method is to allow this logic to be overrided.

RenderLayout ( string layoutName, string contents, IContext ctx, IRailsEngineContext context, TextWriter output ) : void
ResolveJSTemplateName ( string templateName ) : string

Resolves the template name into a velocity JS template file name.

ResolveLayoutTemplateName ( string templateName ) : string

Resolves the layout template name into a velocity template file name.

ResolveTemplateName ( string templateName ) : string

Resolves the template name into a velocity template file name.

비공개 메소드들

메소드 설명
CreateContext ( IRailsEngineContext context, Controller controller ) : IContext
LoadMacros ( ExtendedProperties props ) : void
ProcessLayout ( String contents, Controller controller, IContext ctx, IRailsEngineContext context ) : void
SendErrorDetails ( Exception ex, TextWriter writer ) : void

메소드 상세

BeforeApplyingLayout() 보호된 메소드

protected BeforeApplyingLayout ( string layout, string &contents, Controller controller, IContext ctx, IRailsEngineContext context ) : void
layout string
contents string
controller Controller
ctx IContext
context IRailsEngineContext
리턴 void

BeforeMerge() 보호된 메소드

protected BeforeMerge ( VelocityEngine velocityEngine, Template template, IContext context ) : void
velocityEngine NVelocity.App.VelocityEngine
template NVelocity.Template
context IContext
리턴 void

CreateJSGenerator() 공개 메소드

public CreateJSGenerator ( IRailsEngineContext context ) : object
context IRailsEngineContext
리턴 object

GenerateJS() 공개 메소드

public GenerateJS ( TextWriter output, IRailsEngineContext context, Controller controller, string templateName ) : void
output System.IO.TextWriter
context IRailsEngineContext
controller Controller
templateName string
리턴 void

HasTemplate() 공개 메소드

Evaluates whether the specified template exists.
public HasTemplate ( String templateName ) : bool
templateName String
리턴 bool

Initialize() 공개 메소드

public Initialize ( ) : void
리턴 void

InitializeVelocityProperties() 보호된 메소드

Initializes basic velocity properties. The main purpose of this method is to allow this logic to be overrided.
protected InitializeVelocityProperties ( ExtendedProperties props ) : void
props Commons.Collections.ExtendedProperties The collection to populate.
리턴 void

NVelocityViewEngine() 공개 메소드

Creates a new NVelocityViewEngine instance.
public NVelocityViewEngine ( ) : NVelocity
리턴 NVelocity

Process() 공개 메소드

Processes the specified context.
public Process ( IRailsEngineContext context, Controller controller, String viewName ) : void
context IRailsEngineContext The context.
controller Controller The controller.
viewName String Name of the view.
리턴 void

Process() 공개 메소드

Processes the view - using the templateName to obtain the correct template and writes the results to the System.TextWriter. No layout is applied!
public Process ( TextWriter output, IRailsEngineContext context, Controller controller, String viewName ) : void
output System.IO.TextWriter
context IRailsEngineContext
controller Controller
viewName String
리턴 void

ProcessContents() 공개 메소드

public ProcessContents ( IRailsEngineContext context, Controller controller, String contents ) : void
context IRailsEngineContext
controller Controller
contents String
리턴 void

ProcessPartial() 공개 메소드

public ProcessPartial ( TextWriter output, IRailsEngineContext context, Controller controller, string partialName ) : void
output System.IO.TextWriter
context IRailsEngineContext
controller Controller
partialName string
리턴 void

RenderLayout() 보호된 메소드

protected RenderLayout ( string layoutName, string contents, IContext ctx, IRailsEngineContext context, TextWriter output ) : void
layoutName string
contents string
ctx IContext
context IRailsEngineContext
output System.IO.TextWriter
리턴 void

ResolveJSTemplateName() 보호된 메소드

Resolves the template name into a velocity JS template file name.
protected ResolveJSTemplateName ( string templateName ) : string
templateName string
리턴 string

ResolveLayoutTemplateName() 보호된 메소드

Resolves the layout template name into a velocity template file name.
protected ResolveLayoutTemplateName ( string templateName ) : string
templateName string
리턴 string

ResolveTemplateName() 보호된 메소드

Resolves the template name into a velocity template file name.
protected ResolveTemplateName ( string templateName ) : string
templateName string
리턴 string

Service() 공개 메소드

public Service ( IServiceProvider provider ) : void
provider IServiceProvider
리턴 void

프로퍼티 상세

velocity 보호되어 있는 프로퍼티

protected VelocityEngine,NVelocity.App velocity
리턴 NVelocity.App.VelocityEngine