Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Changing TIWForm based on URL?
#2
We use this server controller event in one of our web applications, see code. Hope this is what you need.

Best regards

Magnus Oskarsson

Code:
procedure TEmIndClientServerController.IWServerControllerBaseGetMainForm(var vMainForm: TIWBaseForm);
begin
  inherited;
  if not ServerIsMaster then {Slave mode}
    vMainForm := TSlaveModeMainWebForm.Create(WebApplication)
  else if WebApplication.RunParams.IndexOfName('s') >= 0 then {Response web link}
    vMainForm := TEmIndClientCalloutMessageWebDialog.Create(WebApplication)
  else if WebApplication.RunParams.IndexOfName('k') >= 0 then {App Alert activation}
    vMainForm := TEmIndClientAppAlertActivationWebForm.Create(WebApplication)
  else if WebApplication.RunParams.IndexOfName('l') >= 0 then {Password retrieval}
    vMainForm := TGenClientRetrieveIndividualPasswordWebDialog.Create(WebApplication)
  else if WebApplication.RunParams.IndexOfName('i') >= 0 then {Set availability}
    vMainForm := TEmIndClientSetAvailabilityWebDialog.Create(WebApplication)
  else
    vMainForm := TBaseIndClientLoginWebDialog.Create(WebApplication);
end{procedure};
Reply


Messages In This Thread
Changing TIWForm based on URL? - by CharCoil - 08-15-2024, 07:23 PM
RE: Changing TIWForm based on URL? - by magosk - 08-21-2024, 02:29 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)