Skip to content

TCustomFPWebModule

Base class for web modules with action and template support

Declaration

Source position: fpweb.pp line 108

type

  TCustomFPWebModule = class(TSessionHTTPModule)
  public
    constructor CreateNew;
    destructor Destroy;
    procedure HandleRequest;
    property Actions: TFPWebActions; {rw}
    property ActionVar: string; {rw}
    property BeforeRequest: TRequestEvent; {rw}
    property OnRequest: TWebActionEvent; {rw}
    property AfterResponse: TResponseEvent; {rw}
    property OnGetAction: TGetActionEvent; {rw}
    property DefActionWhenUnknown: Boolean; {rwd}
    property ModuleTemplate: TFPTemplate; {rw}
    property OnGetParam: TGetParamEvent; {rw}
    property OnTemplateContent: TGetParamEvent; {rw}
    property Request: TRequest; {r}
    property Response: TResponse; {r}
  end;

Description

TCustomFPWebModule extends TSessionHTTPModule with support for web actions, template processing, and advanced request handling. This class provides the foundation for building complex web applications with structured request routing and dynamic content generation.

The module manages a collection of web actions, template variables, and provides hooks for request preprocessing and response postprocessing.

Properties

Member Visibility Description
Actions public Collection of web actions for this module
ActionVar public Name of the request parameter used to identify actions
AfterResponse public Event called after response processing
BeforeRequest public Event called before request processing
DefActionWhenUnknown public Whether to use the default action when no specific action is found
ModuleTemplate public Template used for content generation
Request read only public The current HTTP request being processed
Response read only public The current HTTP response being generated
See all Properties

Methods

Member Visibility Description
CreateNew public Creates a new web module instance
Destroy public Destroys the web module instance
HandleRequest public Processes an incoming HTTP request
See all Methods

Events

Member Visibility Description
OnGetAction public Event called to determine which action to execute
OnGetParam public Event called to resolve template parameters
OnRequest public Event called for request processing
OnTemplateContent public Event called for template content processing
See all Events

See also

Name Description
TFPWebModule Complete web module with published properties
TFPWebActions Collection of web actions with advanced functionality
TSessionHTTPModule