Please remember this is a work in progress. Home » Classes

Classes

 

TIWServerControllerBase

 

Properties

AppPath: string;

Contains the full path the Application is installed.

CacheURL: string;

Contains the URL for the IntraWeb general cache.

ContentPath: string;

Contains the full path for the IntraWeb Content Folder. The default value for the ContentPath is AppPath + 'wwwroot'. The ContentPath is the folder that is exposed to the user by your IntraWeb application, ie, the files that needs to be directly accessible using and URL. You can use this folder to add images, JavaScript files, PDF, HTML files and any file needed by your application.

GUIActive: Boolean;

Indicates the GUI for the Stand Alone Server is active.

MachineName: string;

Contains the computer name your application is running

UserCacheDir: string;

Contains the full path to the folder used as the IntraWeb cache for a specific User Session. You usually uses this property for saving temporary files on the user cache. IntraWeb deletes all files saved on the user cache folder when the user session expires.

UserCacheURL: string;

Contains the URL for the cache for a specific User Session. Use this property for exposing user content you saved on the user cache, as for example a temporary report.

  1. procedure TfrmCustomers.IWLink1Click(Sender: TObject);
  2. var
  3.   xReport: TStringList;
  4.   xFileName: string;
  5. begin
  6.   xReport := UserSession.DM.CustomerOrdersReport(fCustomerID);
  7.   try
  8.     xFileName := gSC.UserCacheDir + UserSession.DM.GenRandomName + '.txt';
  9.     xReport.SaveToFile(xFileName);
  10.     WebApplication.SendFile(xFileName, True, '', 'Customer Report' +
  11.       UserSession.DM.Customers.Dataset.FieldByName('CustNo').AsString + '.txt');
  12.   finally
  13.     FreeAndNil(xReport);
  14.   end;
  15. end;

AuthBeforeNewSession: Boolean;

Informs IntraWeb if the User Authorization will be requested before a user session is created. If you do not uses any custom authorization that depends on any property/method you have delcared on your User Session class, leave this property as False. See also Authorization components.

AppName: string;

Contains the application name.Used when you install your SA Server application as a Service.

BoundIP: string;

Use this property to specify a IP the SA Server application will be bound to. Specialy useful when you run your SA Server in a computer with several network adapters.

CacheDir: TIWDirectoryName;

Contains the full path to the folder used as the IntraWeb general cache.

ComInitialization: TComInitialization;

Informs IntraWeb to call automatically COM initialization routines and the COM model to apply.

Compression: TIWCompressionOptions

Use this property to inform IntraWeb to use compression and also which compression level. IntraWeb compression uses ZLib.

Description: string;

Contains the application Description. Used when you install your SA Server application as a Service.

DisplayName: string;

Contains the Display name for the application. Used when you install your SA Server application as a Service.

Log: TLogOptions; TLogOptions = (loNone, loFile);

Use this property to inform how IntraWeb saves its Log information (used internally by IntraWeb in some parts of the code). When you enable this property, IntraWeb generates the log file in the same folder as your application.

EnableImageToolbar: Boolean;

Use this property to enable the image tool bar when the user pass the mouse over an image (Internet Explorer only);

ExceptionDisplayMode: TIWShowMessageType (smAlert, smNewWindow, smSameWindow, smSameWindowFrame);

Use this property to inform IntraWeb how to show an Application Expcetion to the user.

ExceptionLogger: TIWExceptionLogger;

Use this property to control the behavior of the TIWExceptionLogger class instance.

JavascriptDebug: boolean;

Use this property to indicate if the JavaScript debug is active. If you don't use any JavaScript debugger, like FireBug, you need to add a TIWMemo component to your IW Form and name it INTRAWEBLOG. This makes the IntraWeb JavaScript code output some debug information on this IWMemo component.

HTMLHeaders: TStringList;

Use this property to add custom tags to the headers of your IntraWeb forms. When you add some content to this property, all IntraWeb forms will include it when rendered.

ContentFiles: TStringList;

Use this property to add custom JavaScript files to your IntraWeb forms. When you add some content to this property, all IntraWeb forms will include it when rendered. Ensure the files you are adding are available under your ContentPath folder.

MasterTemplate:string;

Use this property to specify a master template for your application. See Working with Templates for more information

PageTransitions: Boolean;

Use this property to enable page transitions to your application. Works only on Internet Explorer.

Port: Integer;

User this property to inform in which port your Stand Alone Server application will be listening too. Only valid for Stand Alone Server type applications. See Stand Alone Server deployment for more information. Read more about TCP Ports.

ServerResizeTimeout: Integer;

Use this property to specify the amount of time (in miliseconds) the browser will wait for Server when the IW Form has any code assigned to the OnResize event.

Auther: TIWAutherBase;

Use this property to assign one of the built-in Authorization components from IntraWeb. The Authorization components uses the default browser login/password dialog. See Authorization Components for more information.

ShowLoadingAnimation:boolean;

Use this property to indicate IntraWeb to show a loading animation when loading/rendering pages.

SessionTimeout: Integer;

Use this property to indicate the amount of time (in minutes) a user session can remain idle (ie, no user activity in the browser) at the server side. Read only for Personal and Standard editions with the default value of 20 minutes.

StyleSheet: TIWFileReference;

Use this property to indicate a general CSS file for all your IntraWeb forms. The CSS file must be located within the ContentPath folder.

SSLOptions: TIWSSLOptions;

Use this property to indicate the SSL options for your application. Only for Stand Alone Server applications. For ISAPI, use the IIS SSL features.

TemplateDir: string;

Use this property to indicate the folder your application's templates are located. The default value "\Templates", which means the Templates Folder must be under the application folder.

AppURLBase: string;

This property indicates the relative URL for your application's website. You can use it mainly for link compositions. (Incomplete)

Version: string;

Shows the current IntraWeb version

AllowMultipleSessionsPerUser: Boolean;

Indicates if your application suppors multiple user sessions within the same browser window, if your browser support multiple tabs. Check the advanced topics in the Server Controller page for more information.

UnhandledRequest: TIWURLResponderBase;

Set a URLResponder component to control your application behavior when a unhandled request is received. See Using URL Responders

TimeoutResponse: TIWURLResponderBase;

Set a URLResponder component to control your application behavior when a timeout occurs. See Using URL Responders

ShowStartParams: boolean;

Use this property to indicate IntraWeb to keep your URL parameters on the URL after being processed by the application.

DocType: string;

Use this property to indicate IntraWeb a DocType to be used when rendering your pages.

Events

OnAfterDispatch: TOnDispatch;

Use this event to make any pos-processment after the your application dispatches a client request. You need to include the units IW.Http.Request (THttpRequest) and IW.Http.Reply (THttpReply) in your uses clause.

  1. procedure TIWServerController.IWServerControllerBaseAfterDispatch(Request: THttpRequest; aReply: THttpReply);
  2. begin
  3.   if (aReply.Code ry<> 404) then begin
  4.     Log('User agent: ' + Request.UserAgent);
  5.     Log('Content Type: ' + aReply.ContentType);
  6.   end;
  7. end;


OnBeforeDispatch: TOnDispatch;

Use this event to modify the IntraWeb reply before it is sent to the client or any other processment needed by your application. You need to include the units IW.Http.Request (THttpRequest) and IW.Http.Reply (THttpReply) in your uses clause.

  1. procedure TIWServerController.IWServerControllerBaseBeforeDispatch(Request: THttpRequest; aReply: THttpReply);
  2. begin
  3.   if Pos('192.168', Request.RemoteAddr) = 0 then begin
  4.     aReply.SendRedirect('http://www.atozed.com');
  5.   end;
  6. end;


OnCloseSession: TOnCloseSessionEvent;

This event is triggered when a User Session is destroyed.

OnException: TOnExceptionEvent;

This event is truggered when an Exception occurs in your application.

OnGetSessionID: TOnGetSessionID;

This event is triggered after a user session is created and just before IntraWeb creates a session ID for the user session. Use this method if you need to create a custom session ID for each user session.

OnNewSession: TOnNewSessionEvent;

This event is triggered just after a new user session is created.

OnBackButton: TOnBackButtonEvent;

This event is triggered when the track ID of the application is out of sync. For more information see The OnBackButton on the Server Controller advanced topics.

OnBeforeRender:TOnBeforeRenderEvent;

This eventis triggered before IntraWeb renders the next form to be shown to the user. You can use this event to show another form to the user, instead of the form to be shown.

  1. procedure TIWServerController.IWServerControllerBaseBeforeRender(
  2.   ASession: TIWApplication; AForm: TIWBaseForm; var VNewForm: TIWBaseForm);
  3. begin
  4.   if not UserSession.CheckFormSecurity(AForm.ClassName) then begin
  5.     VNewForm := TLoginForm.Create(WebApplication);
  6.     TLoginForm(VNewForm).FormToRequestAuth := AForm.ClassName;
  7.     AForm.Release;
  8.     AForm := Nil;
  9.   end;
  10. end;

OnAfterRender:TOnAfterRenderEvent;

This event is triggered after a form is rendered.

OnUserTag: TOnUserTag;

This event is triggered when the IWP parser finds a user tag in a HTML page served by your application. For more information see User Tags.

OnSessionTag: TOnSessionTag;

This event is triggered when the IWP parser finds a sessiohn tag in a HTML page served by your application. For more information see Session Tags.

OnBrowserCheck: TOnBrowserCheckEvent;

This event is triggered when a new user is connecting ro your application. Use this event to determine the application behavior in accordance to the browser the user is using. See Browsers Support on the Server Contoller advanced topics.

 

Terms of Use | Privacy Statement © 2002 - 2018 Atozed Software