Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Redirect in form constructor
#2
The recommended way is to use ServerController's OnGetMainForm event. From that event you can inspect the request and decide which form to create.

Please note that you should create the instance of the form and pass it using the vMainForm parameter

procedure TIWServerController.IWServerControllerBaseGetMainForm(var vMainForm: TIWBaseForm);
begin
if SomeCondition then
vMainForm := TMyMainForm.Create(WebApplication);
end;
Reply


Messages In This Thread
Redirect in form constructor - by Adrien - 03-16-2022, 08:42 AM
RE: Redirect in form constructor - by Alexandre Machado - 03-17-2022, 09:43 AM
RE: Redirect in form constructor - by Adrien - 03-17-2022, 10:49 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)