C# Class Castle.MonoRail.ActiveRecordScaffold.AbstractScaffoldAction

Base abstract class for actions that relate to Scaffolding support. Provide the basic flow process
Inheritance: IDynamicAction
Afficher le fichier Open project: nats/castle-1.0.3-mono

Protected Properties

Свойство Type Description
binder Castle.MonoRail.ActiveRecordSupport.ARDataBinder
builder Castle.Components.Binder.TreeBuilder
errors System.Collections.ArrayList
modelType System.Type
prop2Validation IDictionary
templateEngine ITemplateEngine

Méthodes publiques

Méthode Description
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

Méthodes protégées

Méthode Description
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

Private Methods

Méthode Description
GetARModel ( ) : ActiveRecordModel

Method Details

AbstractScaffoldAction() public méthode

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.
Résultat System

AssertIsPost() protected static méthode

protected static AssertIsPost ( Controller controller ) : void
controller Castle.MonoRail.Framework.Controller
Résultat void

ComputeTemplateName() protected abstract méthode

Implementors should return the template name for the current action.
protected abstract ComputeTemplateName ( Controller controller ) : string
controller Castle.MonoRail.Framework.Controller
Résultat string

Execute() public méthode

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
Résultat void

ObtainPKProperty() protected méthode

Gets the property that represents the Primary key for the current ActiveRecordModel
protected ObtainPKProperty ( ) : PropertyInfo
Résultat System.Reflection.PropertyInfo

PerformActionProcess() protected méthode

Implementors should perform the action for the scaffolding, like new or create.
protected PerformActionProcess ( Controller controller ) : void
controller Castle.MonoRail.Framework.Controller
Résultat void

RenderFromTemplate() protected méthode

protected RenderFromTemplate ( String templateName, Controller controller ) : void
templateName String
controller Castle.MonoRail.Framework.Controller
Résultat void

RenderStandardHtml() protected abstract méthode

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
Résultat void

SetUpHelpers() protected static méthode

protected static SetUpHelpers ( Controller controller ) : void
controller Castle.MonoRail.Framework.Controller
Résultat void

Property Details

binder protected_oe property

Binder that 'knows' ActiveRecord types
protected ARDataBinder,Castle.MonoRail.ActiveRecordSupport binder
Résultat Castle.MonoRail.ActiveRecordSupport.ARDataBinder

builder protected_oe property

Constructs the data source for the binder
protected TreeBuilder,Castle.Components.Binder builder
Résultat Castle.Components.Binder.TreeBuilder

errors protected_oe property

A list of errors that happened during this process
protected ArrayList,System.Collections errors
Résultat System.Collections.ArrayList

modelType protected_oe property

Holds the AR type
protected Type,System modelType
Résultat System.Type

prop2Validation protected_oe property

A map of PropertyInfo to validation failures
protected IDictionary prop2Validation
Résultat IDictionary

templateEngine protected_oe property

Reference to the template engine instance
protected ITemplateEngine templateEngine
Résultat ITemplateEngine