Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Changing TIWForm based on URL?
#1
Is there a simple way to pick IWForm to load based on URL?
Reply
#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


Forum Jump:


Users browsing this thread: 1 Guest(s)