| 5 |
uses |
uses |
| 6 |
SysUtils, Classes, IWServerControllerBase, IWBaseForm, HTTPApp, |
SysUtils, Classes, IWServerControllerBase, IWBaseForm, HTTPApp, |
| 7 |
// For OnNewSession Event |
// For OnNewSession Event |
| 8 |
UserSessionUnit, IWApplication, IWAppForm; |
UserSessionUnit, IWApplication, IWAppForm, IW.Browser.Browser; |
| 9 |
|
|
| 10 |
type |
type |
| 11 |
TIWServerController = class(TIWServerControllerBase) |
TIWServerController = class(TIWServerControllerBase) |
| 12 |
procedure IWServerControllerBaseNewSession(ASession: TIWApplication); |
procedure IWServerControllerBaseNewSession(ASession: TIWApplication); |
|
procedure IWServerControllerBaseBeforeRender(ASession: TIWApplication; |
|
|
AForm: TIWBaseForm; var VNewForm: TIWBaseForm); |
|
| 13 |
|
|
| 14 |
private |
private |
| 15 |
|
|
| 25 |
{$R *.dfm} |
{$R *.dfm} |
| 26 |
|
|
| 27 |
uses |
uses |
| 28 |
IWInit, IWGlobal, Unit5, Unit7; |
IWInit, IWGlobal; |
| 29 |
|
|
| 30 |
function IWServerController: TIWServerController; |
function IWServerController: TIWServerController; |
| 31 |
begin |
begin |
| 32 |
Result := TIWServerController(GServerController); |
Result := TIWServerController(GServerController); |
| 33 |
end; |
end; |
| 34 |
|
|
| 35 |
|
|
| 36 |
|
|
| 37 |
function UserSession: TIWUserSession; |
function UserSession: TIWUserSession; |
| 38 |
begin |
begin |
| 39 |
Result := TIWUserSession(WebApplication.Data); |
Result := TIWUserSession(WebApplication.Data); |
| 40 |
end; |
end; |
| 41 |
|
|
|
procedure TIWServerController.IWServerControllerBaseBeforeRender( |
|
|
ASession: TIWApplication; AForm: TIWBaseForm; var VNewForm: TIWBaseForm); |
|
|
begin |
|
|
VNewForm:=TCartForm.Create(WebApplication); |
|
|
AForm.Release; |
|
|
end; |
|
|
|
|
| 42 |
procedure TIWServerController.IWServerControllerBaseNewSession( |
procedure TIWServerController.IWServerControllerBaseNewSession( |
| 43 |
ASession: TIWApplication); |
ASession: TIWApplication); |
| 44 |
begin |
begin |
| 45 |
ASession.Data := TIWUserSession.Create(nil); |
ASession.Data := TIWUserSession.Create(nil, ASession); |
| 46 |
end; |
end; |
| 47 |
|
|
| 48 |
|
|