Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
URL param with THandler
#2
If I had a trouble like this, I would use the simplest code I could.
Code:
procedure TIWServerController.IWServerControllerBaseGetMainForm(
  var vMainForm: TIWBaseForm);
begin
  if WebApplication.RunParams.Count>0
  then
  begin
    if WebApplication.RunParams[0]='steg'
    then
      vmainForm:=TIWForm9.Create(WebApplication)
    else  
      vmainForm:=TIWForm2.Create(WebApplication) //main form
  end
  else
    vmainForm:=TIWForm2.Create(WebApplication) //main form
end;
What you need, as I see, is to choose the starting form depending also on the user, so you could just use another param to detect the user. Maybe there is another simpler way, but if something works for me, I use the code without looking for another solution.
Reply


Messages In This Thread
URL param with THandler - by etwoss - 02-09-2020, 08:04 AM
RE: URL param with THandler - by MrSpock - 02-09-2020, 10:16 AM
RE: URL param with THandler - by etwoss - 02-10-2020, 11:21 AM
RE: URL param with THandler - by etwoss - 02-14-2020, 06:37 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)