C# Класс Castle.MonoRail.ActiveRecordScaffold.AbstractScaffoldAction

Base abstract class for actions that relate to Scaffolding support. Provide the basic flow process
Наследование: IDynamicAction
Показать файл Открыть проект

Защищенные свойства (Protected)

Свойство Тип Описание
binder Castle.MonoRail.ActiveRecordSupport.ARDataBinder
builder Castle.Components.Binder.TreeBuilder
errors System.Collections.ArrayList
modelType System.Type
prop2Validation IDictionary
templateEngine ITemplateEngine

Открытые методы

Метод Описание
AbstractScaffoldAction ( Type modelType, ITemplateEngine templateEngine, bool useModelName, bool useDefaultLayout ) : System

Initializes a new instance of the AbstractScaffoldAction class.

Execute ( Controller controller ) : void

Executes the basic flow which is Resolve the ActiveRecordModel Resolve the layout (if not is associated with the controller, defaults to "scaffold") Invokes PerformActionProcess which should perform the correct process for this action Resolves the template name that the developer might provide by using ComputeTemplateName If the template exists, renders it. Otherwise invokes RenderStandardHtml

Защищенные методы

Метод Описание
AssertIsPost ( Controller controller ) : void
ComputeTemplateName ( Controller controller ) : string

Implementors should return the template name for the current action.

ObtainPKProperty ( ) : PropertyInfo

Gets the property that represents the Primary key for the current ActiveRecordModel

PerformActionProcess ( Controller controller ) : void

Implementors should perform the action for the scaffolding, like new or create.

RenderFromTemplate ( String templateName, Controller controller ) : void
RenderStandardHtml ( Controller controller ) : void

Only invoked if the programmer havent provided a custom template for the current action. Implementors should create a basic html to present.

SetUpHelpers ( Controller controller ) : void

Приватные методы

Метод Описание
GetARModel ( ) : ActiveRecordModel

Описание методов

AbstractScaffoldAction() публичный Метод

Initializes a new instance of the AbstractScaffoldAction class.
public AbstractScaffoldAction ( Type modelType, ITemplateEngine templateEngine, bool useModelName, bool useDefaultLayout ) : System
modelType System.Type Type of the model.
templateEngine ITemplateEngine The template engine.
useModelName bool Indicates that we should use the model name on urls
useDefaultLayout bool Whether we should use our layout.
Результат System

AssertIsPost() защищенный статический Метод

protected static AssertIsPost ( Controller controller ) : void
controller Castle.MonoRail.Framework.Controller
Результат void

ComputeTemplateName() защищенный абстрактный Метод

Implementors should return the template name for the current action.
protected abstract ComputeTemplateName ( Controller controller ) : string
controller Castle.MonoRail.Framework.Controller
Результат string

Execute() публичный Метод

Executes the basic flow which is Resolve the ActiveRecordModel Resolve the layout (if not is associated with the controller, defaults to "scaffold") Invokes PerformActionProcess which should perform the correct process for this action Resolves the template name that the developer might provide by using ComputeTemplateName If the template exists, renders it. Otherwise invokes RenderStandardHtml
public Execute ( Controller controller ) : void
controller Castle.MonoRail.Framework.Controller
Результат void

ObtainPKProperty() защищенный Метод

Gets the property that represents the Primary key for the current ActiveRecordModel
protected ObtainPKProperty ( ) : PropertyInfo
Результат System.Reflection.PropertyInfo

PerformActionProcess() защищенный Метод

Implementors should perform the action for the scaffolding, like new or create.
protected PerformActionProcess ( Controller controller ) : void
controller Castle.MonoRail.Framework.Controller
Результат void

RenderFromTemplate() защищенный Метод

protected RenderFromTemplate ( String templateName, Controller controller ) : void
templateName String
controller Castle.MonoRail.Framework.Controller
Результат void

RenderStandardHtml() защищенный абстрактный Метод

Only invoked if the programmer havent provided a custom template for the current action. Implementors should create a basic html to present.
protected abstract RenderStandardHtml ( Controller controller ) : void
controller Castle.MonoRail.Framework.Controller
Результат void

SetUpHelpers() защищенный статический Метод

protected static SetUpHelpers ( Controller controller ) : void
controller Castle.MonoRail.Framework.Controller
Результат void

Описание свойств

binder защищенное свойство

Binder that 'knows' ActiveRecord types
protected ARDataBinder,Castle.MonoRail.ActiveRecordSupport binder
Результат Castle.MonoRail.ActiveRecordSupport.ARDataBinder

builder защищенное свойство

Constructs the data source for the binder
protected TreeBuilder,Castle.Components.Binder builder
Результат Castle.Components.Binder.TreeBuilder

errors защищенное свойство

A list of errors that happened during this process
protected ArrayList,System.Collections errors
Результат System.Collections.ArrayList

modelType защищенное свойство

Holds the AR type
protected Type,System modelType
Результат System.Type

prop2Validation защищенное свойство

A map of PropertyInfo to validation failures
protected IDictionary prop2Validation
Результат IDictionary

templateEngine защищенное свойство

Reference to the template engine instance
protected ITemplateEngine templateEngine
Результат ITemplateEngine