AddStartHandler

<< Click to Display Table of Contents >>

Navigation:  Classes > THandlers > Methods >

AddStartHandler

This function adds an instance of TContentBase (or descendant class) to the content handlers list and also register this instance as the start handler, meaning that this instance will handle all requests starting a new session.

 

SIGNATURE=IW.Content.Handlers.THandlers.AddStartHandler@string@string@TContentBase

 

ETYPE=Method

 

Declaration:

Delphi:

public class function AddStartHandler(const aPath: string; const aDocument: string; aHandler: TContentBase): TContentBase;

C++:

public: __fastcall TContentBase AddStartHandler(const String aPath, const String aDocument, TContentBase aHandler);

 

Description: StartHandler is used by SendSessionStart(). If registered, SendSessionStart() will redirect to its path so it will be executed first, instead of the main form

 

Parameters:

 

aPath (string): Path of the document, e.g: '/reports/'

aDocument (string): Name of the document, e.g: 'Report1.html'

aHandler (TContentBase): The instance that will handle the request

 

Result: Returns the instance (the same reference received in aHandler parameter).